@arcadeai/arcadejs 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/LICENSE +201 -0
- package/README.md +305 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +242 -0
- package/core.d.ts.map +1 -0
- package/core.js +903 -0
- package/core.js.map +1 -0
- package/core.mjs +871 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +53 -0
- package/error.d.ts.map +1 -0
- package/error.js +143 -0
- package/error.js.map +1 -0
- package/error.mjs +127 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +146 -0
- package/index.d.ts +146 -0
- package/index.d.ts.map +1 -0
- package/index.js +118 -0
- package/index.js.map +1 -0
- package/index.mjs +90 -0
- package/index.mjs.map +1 -0
- package/package.json +103 -0
- package/pagination.d.ts +26 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +46 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +42 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/auth.d.ts +68 -0
- package/resources/auth.d.ts.map +1 -0
- package/resources/auth.js +25 -0
- package/resources/auth.js.map +1 -0
- package/resources/auth.mjs +21 -0
- package/resources/auth.mjs.map +1 -0
- package/resources/chat/chat.d.ts +136 -0
- package/resources/chat/chat.d.ts.map +1 -0
- package/resources/chat/chat.js +40 -0
- package/resources/chat/chat.js.map +1 -0
- package/resources/chat/chat.mjs +13 -0
- package/resources/chat/chat.mjs.map +1 -0
- package/resources/chat/completions.d.ts +76 -0
- package/resources/chat/completions.d.ts.map +1 -0
- package/resources/chat/completions.js +17 -0
- package/resources/chat/completions.js.map +1 -0
- package/resources/chat/completions.mjs +13 -0
- package/resources/chat/completions.mjs.map +1 -0
- package/resources/chat/index.d.ts +3 -0
- package/resources/chat/index.d.ts.map +1 -0
- package/resources/chat/index.js +9 -0
- package/resources/chat/index.js.map +1 -0
- package/resources/chat/index.mjs +4 -0
- package/resources/chat/index.mjs.map +1 -0
- package/resources/health.d.ts +16 -0
- package/resources/health.d.ts.map +1 -0
- package/resources/health.js +17 -0
- package/resources/health.js.map +1 -0
- package/resources/health.mjs +13 -0
- package/resources/health.mjs.map +1 -0
- package/resources/index.d.ts +6 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +28 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +7 -0
- package/resources/index.mjs.map +1 -0
- package/resources/shared.d.ts +30 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/tools/definition.d.ts +24 -0
- package/resources/tools/definition.d.ts.map +1 -0
- package/resources/tools/definition.js +17 -0
- package/resources/tools/definition.js.map +1 -0
- package/resources/tools/definition.mjs +13 -0
- package/resources/tools/definition.mjs.map +1 -0
- package/resources/tools/formatted.d.ts +48 -0
- package/resources/tools/formatted.d.ts.map +1 -0
- package/resources/tools/formatted.js +56 -0
- package/resources/tools/formatted.js.map +1 -0
- package/resources/tools/formatted.mjs +28 -0
- package/resources/tools/formatted.mjs.map +1 -0
- package/resources/tools/index.d.ts +3 -0
- package/resources/tools/index.d.ts.map +1 -0
- package/resources/tools/index.js +10 -0
- package/resources/tools/index.js.map +1 -0
- package/resources/tools/index.mjs +4 -0
- package/resources/tools/index.mjs.map +1 -0
- package/resources/tools/tools.d.ts +169 -0
- package/resources/tools/tools.d.ts.map +1 -0
- package/resources/tools/tools.js +68 -0
- package/resources/tools/tools.js.map +1 -0
- package/resources/tools/tools.mjs +41 -0
- package/resources/tools/tools.mjs.map +1 -0
- package/resources/tools.d.ts +161 -0
- package/resources/tools.d.ts.map +1 -0
- package/resources/tools.js +38 -0
- package/resources/tools.js.map +1 -0
- package/resources/tools.mjs +34 -0
- package/resources/tools.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1196 -0
- package/src/error.ts +146 -0
- package/src/index.ts +227 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +79 -0
- package/src/resource.ts +11 -0
- package/src/resources/auth.ts +97 -0
- package/src/resources/chat/chat.ts +186 -0
- package/src/resources/chat/completions.ts +102 -0
- package/src/resources/chat/index.ts +4 -0
- package/src/resources/health.ts +22 -0
- package/src/resources/index.ts +23 -0
- package/src/resources/shared.ts +46 -0
- package/src/resources/tools/definition.ts +31 -0
- package/src/resources/tools/formatted.ts +78 -0
- package/src/resources/tools/index.ts +27 -0
- package/src/resources/tools/tools.ts +249 -0
- package/src/resources/tools.ts +240 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as ChatAPI from './chat';
|
|
5
|
+
import * as Shared from '../shared';
|
|
6
|
+
import * as CompletionsAPI from './completions';
|
|
7
|
+
|
|
8
|
+
export class Chat extends APIResource {
|
|
9
|
+
completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ChatMessage {
|
|
13
|
+
/**
|
|
14
|
+
* The content of the message.
|
|
15
|
+
*/
|
|
16
|
+
content: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The role of the author of this message. One of system, user, tool, or assistant.
|
|
20
|
+
*/
|
|
21
|
+
role: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* tool Name
|
|
25
|
+
*/
|
|
26
|
+
name?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* tool_call_id
|
|
30
|
+
*/
|
|
31
|
+
tool_call_id?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* tool calls if any
|
|
35
|
+
*/
|
|
36
|
+
tool_calls?: Array<ChatMessage.ToolCall>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export namespace ChatMessage {
|
|
40
|
+
export interface ToolCall {
|
|
41
|
+
id?: string;
|
|
42
|
+
|
|
43
|
+
function?: ToolCall.Function;
|
|
44
|
+
|
|
45
|
+
type?: 'function';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export namespace ToolCall {
|
|
49
|
+
export interface Function {
|
|
50
|
+
arguments?: string;
|
|
51
|
+
|
|
52
|
+
name?: string;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ChatRequest {
|
|
58
|
+
frequency_penalty?: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* LogitBias is must be a token id string (specified by their token ID in the
|
|
62
|
+
* tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct:
|
|
63
|
+
* `"logit_bias":{"1639": 6}` refs:
|
|
64
|
+
* https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
|
|
65
|
+
*/
|
|
66
|
+
logit_bias?: Record<string, number>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* LogProbs indicates whether to return log probabilities of the output tokens or
|
|
70
|
+
* not. If true, returns the log probabilities of each output token returned in the
|
|
71
|
+
* content of message. This option is currently not available on the
|
|
72
|
+
* gpt-4-vision-preview model.
|
|
73
|
+
*/
|
|
74
|
+
logprobs?: boolean;
|
|
75
|
+
|
|
76
|
+
max_tokens?: number;
|
|
77
|
+
|
|
78
|
+
messages?: Array<ChatMessage>;
|
|
79
|
+
|
|
80
|
+
model?: string;
|
|
81
|
+
|
|
82
|
+
n?: number;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Disable the default behavior of parallel tool calls by setting it: false.
|
|
86
|
+
*/
|
|
87
|
+
parallel_tool_calls?: boolean;
|
|
88
|
+
|
|
89
|
+
presence_penalty?: number;
|
|
90
|
+
|
|
91
|
+
response_format?: 'json_object' | 'text';
|
|
92
|
+
|
|
93
|
+
seed?: number;
|
|
94
|
+
|
|
95
|
+
stop?: Array<string>;
|
|
96
|
+
|
|
97
|
+
stream?: boolean;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
101
|
+
*/
|
|
102
|
+
stream_options?: ChatRequest.StreamOptions;
|
|
103
|
+
|
|
104
|
+
temperature?: number;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* This can be either a string or an ToolChoice object.
|
|
108
|
+
*/
|
|
109
|
+
tool_choice?: unknown;
|
|
110
|
+
|
|
111
|
+
tools?: unknown;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* TopLogProbs is an integer between 0 and 5 specifying the number of most likely
|
|
115
|
+
* tokens to return at each token position, each with an associated log
|
|
116
|
+
* probability. logprobs must be set to true if this parameter is used.
|
|
117
|
+
*/
|
|
118
|
+
top_logprobs?: number;
|
|
119
|
+
|
|
120
|
+
top_p?: number;
|
|
121
|
+
|
|
122
|
+
user?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export namespace ChatRequest {
|
|
126
|
+
/**
|
|
127
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
128
|
+
*/
|
|
129
|
+
export interface StreamOptions {
|
|
130
|
+
/**
|
|
131
|
+
* If set, an additional chunk will be streamed before the data: [DONE] message.
|
|
132
|
+
* The usage field on this chunk shows the token usage statistics for the entire
|
|
133
|
+
* request, and the choices field will always be an empty array. All other chunks
|
|
134
|
+
* will also include a usage field, but with a null value.
|
|
135
|
+
*/
|
|
136
|
+
include_usage?: boolean;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface ChatResponse {
|
|
141
|
+
id?: string;
|
|
142
|
+
|
|
143
|
+
choices?: Array<Choice>;
|
|
144
|
+
|
|
145
|
+
created?: number;
|
|
146
|
+
|
|
147
|
+
model?: string;
|
|
148
|
+
|
|
149
|
+
object?: string;
|
|
150
|
+
|
|
151
|
+
system_fingerprint?: string;
|
|
152
|
+
|
|
153
|
+
usage?: Usage;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface Choice {
|
|
157
|
+
finish_reason?: string;
|
|
158
|
+
|
|
159
|
+
index?: number;
|
|
160
|
+
|
|
161
|
+
logprobs?: unknown;
|
|
162
|
+
|
|
163
|
+
message?: ChatMessage;
|
|
164
|
+
|
|
165
|
+
tool_authorizations?: Array<Shared.AuthorizationResponse>;
|
|
166
|
+
|
|
167
|
+
tool_messages?: Array<ChatMessage>;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface Usage {
|
|
171
|
+
completion_tokens?: number;
|
|
172
|
+
|
|
173
|
+
prompt_tokens?: number;
|
|
174
|
+
|
|
175
|
+
total_tokens?: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export namespace Chat {
|
|
179
|
+
export import ChatMessage = ChatAPI.ChatMessage;
|
|
180
|
+
export import ChatRequest = ChatAPI.ChatRequest;
|
|
181
|
+
export import ChatResponse = ChatAPI.ChatResponse;
|
|
182
|
+
export import Choice = ChatAPI.Choice;
|
|
183
|
+
export import Usage = ChatAPI.Usage;
|
|
184
|
+
export import Completions = CompletionsAPI.Completions;
|
|
185
|
+
export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
|
|
186
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import * as CompletionsAPI from './completions';
|
|
6
|
+
import * as ChatAPI from './chat';
|
|
7
|
+
|
|
8
|
+
export class Completions extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Talk to different LLM Chat APIs via OpenAI's API
|
|
11
|
+
*/
|
|
12
|
+
create(body: CompletionCreateParams, options?: Core.RequestOptions): Core.APIPromise<ChatAPI.ChatResponse> {
|
|
13
|
+
return this._client.post('/v1/chat/completions', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CompletionCreateParams {
|
|
18
|
+
frequency_penalty?: number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* LogitBias is must be a token id string (specified by their token ID in the
|
|
22
|
+
* tokenizer), not a word string. incorrect: `"logit_bias":{"You": 6}`, correct:
|
|
23
|
+
* `"logit_bias":{"1639": 6}` refs:
|
|
24
|
+
* https://platform.openai.com/docs/api-reference/chat/create#chat/create-logit_bias
|
|
25
|
+
*/
|
|
26
|
+
logit_bias?: Record<string, number>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* LogProbs indicates whether to return log probabilities of the output tokens or
|
|
30
|
+
* not. If true, returns the log probabilities of each output token returned in the
|
|
31
|
+
* content of message. This option is currently not available on the
|
|
32
|
+
* gpt-4-vision-preview model.
|
|
33
|
+
*/
|
|
34
|
+
logprobs?: boolean;
|
|
35
|
+
|
|
36
|
+
max_tokens?: number;
|
|
37
|
+
|
|
38
|
+
messages?: Array<ChatAPI.ChatMessage>;
|
|
39
|
+
|
|
40
|
+
model?: string;
|
|
41
|
+
|
|
42
|
+
n?: number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Disable the default behavior of parallel tool calls by setting it: false.
|
|
46
|
+
*/
|
|
47
|
+
parallel_tool_calls?: boolean;
|
|
48
|
+
|
|
49
|
+
presence_penalty?: number;
|
|
50
|
+
|
|
51
|
+
response_format?: 'json_object' | 'text';
|
|
52
|
+
|
|
53
|
+
seed?: number;
|
|
54
|
+
|
|
55
|
+
stop?: Array<string>;
|
|
56
|
+
|
|
57
|
+
stream?: boolean;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
61
|
+
*/
|
|
62
|
+
stream_options?: CompletionCreateParams.StreamOptions;
|
|
63
|
+
|
|
64
|
+
temperature?: number;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* This can be either a string or an ToolChoice object.
|
|
68
|
+
*/
|
|
69
|
+
tool_choice?: unknown;
|
|
70
|
+
|
|
71
|
+
tools?: unknown;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* TopLogProbs is an integer between 0 and 5 specifying the number of most likely
|
|
75
|
+
* tokens to return at each token position, each with an associated log
|
|
76
|
+
* probability. logprobs must be set to true if this parameter is used.
|
|
77
|
+
*/
|
|
78
|
+
top_logprobs?: number;
|
|
79
|
+
|
|
80
|
+
top_p?: number;
|
|
81
|
+
|
|
82
|
+
user?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export namespace CompletionCreateParams {
|
|
86
|
+
/**
|
|
87
|
+
* Options for streaming response. Only set this when you set stream: true.
|
|
88
|
+
*/
|
|
89
|
+
export interface StreamOptions {
|
|
90
|
+
/**
|
|
91
|
+
* If set, an additional chunk will be streamed before the data: [DONE] message.
|
|
92
|
+
* The usage field on this chunk shows the token usage statistics for the entire
|
|
93
|
+
* request, and the choices field will always be an empty array. All other chunks
|
|
94
|
+
* will also include a usage field, but with a null value.
|
|
95
|
+
*/
|
|
96
|
+
include_usage?: boolean;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export namespace Completions {
|
|
101
|
+
export import CompletionCreateParams = CompletionsAPI.CompletionCreateParams;
|
|
102
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
|
+
import * as HealthAPI from './health';
|
|
6
|
+
|
|
7
|
+
export class Health extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Engine Health
|
|
10
|
+
*/
|
|
11
|
+
check(options?: Core.RequestOptions): Core.APIPromise<HealthSchema> {
|
|
12
|
+
return this._client.get('/v1/health', options);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface HealthSchema {
|
|
17
|
+
healthy?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace Health {
|
|
21
|
+
export import HealthSchema = HealthAPI.HealthSchema;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export * from './shared';
|
|
4
|
+
export { AuthRequest, AuthAuthorizeParams, AuthStatusParams, Auth } from './auth';
|
|
5
|
+
export {
|
|
6
|
+
AuthorizeToolRequest,
|
|
7
|
+
ExecuteToolRequest,
|
|
8
|
+
Inputs,
|
|
9
|
+
Output,
|
|
10
|
+
Parameter,
|
|
11
|
+
Requirements,
|
|
12
|
+
Response,
|
|
13
|
+
ResponseOutput,
|
|
14
|
+
ToolkitDefinition,
|
|
15
|
+
ValueSchema,
|
|
16
|
+
ToolListParams,
|
|
17
|
+
ToolAuthorizeParams,
|
|
18
|
+
ToolExecuteParams,
|
|
19
|
+
ToolGetParams,
|
|
20
|
+
Tools,
|
|
21
|
+
} from './tools/tools';
|
|
22
|
+
export { ChatMessage, ChatRequest, ChatResponse, Choice, Usage, Chat } from './chat/chat';
|
|
23
|
+
export { HealthSchema, Health } from './health';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as ToolsAPI from './tools/tools';
|
|
4
|
+
import { OffsetPage } from '../pagination';
|
|
5
|
+
|
|
6
|
+
export interface AuthorizationResponse {
|
|
7
|
+
authorization_id?: string;
|
|
8
|
+
|
|
9
|
+
authorization_url?: string;
|
|
10
|
+
|
|
11
|
+
context?: AuthorizationResponse.Context;
|
|
12
|
+
|
|
13
|
+
scopes?: Array<string>;
|
|
14
|
+
|
|
15
|
+
status?: 'pending' | 'completed' | 'failed';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export namespace AuthorizationResponse {
|
|
19
|
+
export interface Context {
|
|
20
|
+
token?: string;
|
|
21
|
+
|
|
22
|
+
user_info?: Record<string, unknown>;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Error {
|
|
27
|
+
message?: string;
|
|
28
|
+
|
|
29
|
+
name?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ToolDefinition {
|
|
33
|
+
inputs: ToolsAPI.Inputs;
|
|
34
|
+
|
|
35
|
+
name: string;
|
|
36
|
+
|
|
37
|
+
toolkit: ToolsAPI.ToolkitDefinition;
|
|
38
|
+
|
|
39
|
+
description?: string;
|
|
40
|
+
|
|
41
|
+
output?: ToolsAPI.Output;
|
|
42
|
+
|
|
43
|
+
requirements?: ToolsAPI.Requirements;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class ToolDefinitionsOffsetPage extends OffsetPage<ToolDefinition> {}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import * as DefinitionAPI from './definition';
|
|
6
|
+
import * as Shared from '../shared';
|
|
7
|
+
|
|
8
|
+
export class Definition extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the arcade tool specification for a specific tool
|
|
11
|
+
*/
|
|
12
|
+
get(query: DefinitionGetParams, options?: Core.RequestOptions): Core.APIPromise<Shared.ToolDefinition> {
|
|
13
|
+
return this._client.get('/v1/tools/definition', { query, ...options });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface DefinitionGetParams {
|
|
18
|
+
/**
|
|
19
|
+
* Director ID
|
|
20
|
+
*/
|
|
21
|
+
directorId: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Tool ID
|
|
25
|
+
*/
|
|
26
|
+
toolId: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export namespace Definition {
|
|
30
|
+
export import DefinitionGetParams = DefinitionAPI.DefinitionGetParams;
|
|
31
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
|
+
import * as FormattedAPI from './formatted';
|
|
7
|
+
import { OffsetPage, type OffsetPageParams } from '../../pagination';
|
|
8
|
+
|
|
9
|
+
export class Formatted extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Returns a page of tools, optionally filtered by toolkit, formatted for a
|
|
12
|
+
* specific provider
|
|
13
|
+
*/
|
|
14
|
+
list(
|
|
15
|
+
query?: FormattedListParams,
|
|
16
|
+
options?: Core.RequestOptions,
|
|
17
|
+
): Core.PagePromise<FormattedListResponsesOffsetPage, FormattedListResponse>;
|
|
18
|
+
list(
|
|
19
|
+
options?: Core.RequestOptions,
|
|
20
|
+
): Core.PagePromise<FormattedListResponsesOffsetPage, FormattedListResponse>;
|
|
21
|
+
list(
|
|
22
|
+
query: FormattedListParams | Core.RequestOptions = {},
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.PagePromise<FormattedListResponsesOffsetPage, FormattedListResponse> {
|
|
25
|
+
if (isRequestOptions(query)) {
|
|
26
|
+
return this.list({}, query);
|
|
27
|
+
}
|
|
28
|
+
return this._client.getAPIList('/v1/tools/formatted/list', FormattedListResponsesOffsetPage, {
|
|
29
|
+
query,
|
|
30
|
+
...options,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Returns the formatted tool specification for a specific tool, given a provider
|
|
36
|
+
*/
|
|
37
|
+
get(query: FormattedGetParams, options?: Core.RequestOptions): Core.APIPromise<unknown> {
|
|
38
|
+
return this._client.get('/v1/tools/formatted/definition', { query, ...options });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class FormattedListResponsesOffsetPage extends OffsetPage<FormattedListResponse> {}
|
|
43
|
+
|
|
44
|
+
export type FormattedListResponse = unknown;
|
|
45
|
+
|
|
46
|
+
export type FormattedGetResponse = unknown;
|
|
47
|
+
|
|
48
|
+
export interface FormattedListParams extends OffsetPageParams {
|
|
49
|
+
/**
|
|
50
|
+
* Provider format
|
|
51
|
+
*/
|
|
52
|
+
format?: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Toolkit name
|
|
56
|
+
*/
|
|
57
|
+
toolkit?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface FormattedGetParams {
|
|
61
|
+
/**
|
|
62
|
+
* Tool ID
|
|
63
|
+
*/
|
|
64
|
+
toolId: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Provider format
|
|
68
|
+
*/
|
|
69
|
+
format?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export namespace Formatted {
|
|
73
|
+
export import FormattedListResponse = FormattedAPI.FormattedListResponse;
|
|
74
|
+
export import FormattedGetResponse = FormattedAPI.FormattedGetResponse;
|
|
75
|
+
export import FormattedListResponsesOffsetPage = FormattedAPI.FormattedListResponsesOffsetPage;
|
|
76
|
+
export import FormattedListParams = FormattedAPI.FormattedListParams;
|
|
77
|
+
export import FormattedGetParams = FormattedAPI.FormattedGetParams;
|
|
78
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
AuthorizeToolRequest,
|
|
5
|
+
ExecuteToolRequest,
|
|
6
|
+
Inputs,
|
|
7
|
+
Output,
|
|
8
|
+
Parameter,
|
|
9
|
+
Requirements,
|
|
10
|
+
Response,
|
|
11
|
+
ResponseOutput,
|
|
12
|
+
ToolkitDefinition,
|
|
13
|
+
ValueSchema,
|
|
14
|
+
ToolListParams,
|
|
15
|
+
ToolAuthorizeParams,
|
|
16
|
+
ToolExecuteParams,
|
|
17
|
+
ToolGetParams,
|
|
18
|
+
Tools,
|
|
19
|
+
} from './tools';
|
|
20
|
+
export {
|
|
21
|
+
FormattedListResponse,
|
|
22
|
+
FormattedGetResponse,
|
|
23
|
+
FormattedListParams,
|
|
24
|
+
FormattedGetParams,
|
|
25
|
+
FormattedListResponsesOffsetPage,
|
|
26
|
+
Formatted,
|
|
27
|
+
} from './formatted';
|