@bodhiapp/ts-client 0.1.26 → 0.1.27
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/dist/index.d.ts +1 -0
- package/dist/openai.d.ts +1 -0
- package/dist/openai.js +20 -0
- package/dist/openai.mjs +2 -0
- package/dist/openapi-typescript/openapi-schema-oai.d.ts +4371 -0
- package/dist/openapi-typescript/openapi-schema-oai.ts +4372 -0
- package/dist/openapi-typescript/openapi-schema.d.ts +383 -2169
- package/dist/openapi-typescript/openapi-schema.ts +383 -2169
- package/dist/types/types.gen.d.ts +357 -1770
- package/dist/types/types.gen.ts +378 -1935
- package/dist/types-oai/index.d.ts +1 -0
- package/dist/types-oai/index.ts +2 -0
- package/dist/types-oai/types.gen.d.ts +4428 -0
- package/dist/types-oai/types.gen.ts +4810 -0
- package/package.json +23 -7
|
@@ -0,0 +1,4371 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/api/chat": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get?: never;
|
|
14
|
+
put?: never;
|
|
15
|
+
/**
|
|
16
|
+
* Chat with Model (Ollama Compatible)
|
|
17
|
+
* @description Creates a chat completion using Ollama API format. Supports both streaming and non-streaming responses with Ollama-specific options and response format.
|
|
18
|
+
*/
|
|
19
|
+
post: operations["chatOllamaModel"];
|
|
20
|
+
delete?: never;
|
|
21
|
+
options?: never;
|
|
22
|
+
head?: never;
|
|
23
|
+
patch?: never;
|
|
24
|
+
trace?: never;
|
|
25
|
+
};
|
|
26
|
+
"/api/show": {
|
|
27
|
+
parameters: {
|
|
28
|
+
query?: never;
|
|
29
|
+
header?: never;
|
|
30
|
+
path?: never;
|
|
31
|
+
cookie?: never;
|
|
32
|
+
};
|
|
33
|
+
get?: never;
|
|
34
|
+
put?: never;
|
|
35
|
+
/**
|
|
36
|
+
* Show Model Details (Ollama Compatible)
|
|
37
|
+
* @description Retrieves detailed information about a specific model in Ollama API compatible format. Includes model parameters, template, license, and configuration details.
|
|
38
|
+
*/
|
|
39
|
+
post: operations["showOllamaModel"];
|
|
40
|
+
delete?: never;
|
|
41
|
+
options?: never;
|
|
42
|
+
head?: never;
|
|
43
|
+
patch?: never;
|
|
44
|
+
trace?: never;
|
|
45
|
+
};
|
|
46
|
+
"/api/tags": {
|
|
47
|
+
parameters: {
|
|
48
|
+
query?: never;
|
|
49
|
+
header?: never;
|
|
50
|
+
path?: never;
|
|
51
|
+
cookie?: never;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* List Available Models (Ollama Compatible)
|
|
55
|
+
* @description Returns a list of all available models in Ollama API compatible format. Includes model metadata such as size, modification time, and format details.
|
|
56
|
+
*/
|
|
57
|
+
get: operations["listOllamaModels"];
|
|
58
|
+
put?: never;
|
|
59
|
+
post?: never;
|
|
60
|
+
delete?: never;
|
|
61
|
+
options?: never;
|
|
62
|
+
head?: never;
|
|
63
|
+
patch?: never;
|
|
64
|
+
trace?: never;
|
|
65
|
+
};
|
|
66
|
+
"/v1/chat/completions": {
|
|
67
|
+
parameters: {
|
|
68
|
+
query?: never;
|
|
69
|
+
header?: never;
|
|
70
|
+
path?: never;
|
|
71
|
+
cookie?: never;
|
|
72
|
+
};
|
|
73
|
+
get?: never;
|
|
74
|
+
put?: never;
|
|
75
|
+
/**
|
|
76
|
+
* Create Chat Completion (OpenAI Compatible)
|
|
77
|
+
* @description Creates a chat completion response using the specified model. Supports both streaming and non-streaming responses. Fully compatible with OpenAI's chat completions API format.
|
|
78
|
+
*/
|
|
79
|
+
post: operations["createChatCompletion"];
|
|
80
|
+
delete?: never;
|
|
81
|
+
options?: never;
|
|
82
|
+
head?: never;
|
|
83
|
+
patch?: never;
|
|
84
|
+
trace?: never;
|
|
85
|
+
};
|
|
86
|
+
"/v1/embeddings": {
|
|
87
|
+
parameters: {
|
|
88
|
+
query?: never;
|
|
89
|
+
header?: never;
|
|
90
|
+
path?: never;
|
|
91
|
+
cookie?: never;
|
|
92
|
+
};
|
|
93
|
+
get?: never;
|
|
94
|
+
put?: never;
|
|
95
|
+
/**
|
|
96
|
+
* Create Embeddings (OpenAI Compatible)
|
|
97
|
+
* @description Creates embeddings for the input text using the specified model. Fully compatible with OpenAI's embeddings API format.
|
|
98
|
+
*/
|
|
99
|
+
post: operations["createEmbedding"];
|
|
100
|
+
delete?: never;
|
|
101
|
+
options?: never;
|
|
102
|
+
head?: never;
|
|
103
|
+
patch?: never;
|
|
104
|
+
trace?: never;
|
|
105
|
+
};
|
|
106
|
+
"/v1/models": {
|
|
107
|
+
parameters: {
|
|
108
|
+
query?: never;
|
|
109
|
+
header?: never;
|
|
110
|
+
path?: never;
|
|
111
|
+
cookie?: never;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* List Available Models (OpenAI Compatible)
|
|
115
|
+
* @description Returns a list of all available models in OpenAI API compatible format. Includes user aliases, model aliases, and API provider aliases that can be used with the chat completions endpoint.
|
|
116
|
+
*/
|
|
117
|
+
get: operations["listModels"];
|
|
118
|
+
put?: never;
|
|
119
|
+
post?: never;
|
|
120
|
+
delete?: never;
|
|
121
|
+
options?: never;
|
|
122
|
+
head?: never;
|
|
123
|
+
patch?: never;
|
|
124
|
+
trace?: never;
|
|
125
|
+
};
|
|
126
|
+
"/v1/models/{id}": {
|
|
127
|
+
parameters: {
|
|
128
|
+
query?: never;
|
|
129
|
+
header?: never;
|
|
130
|
+
path?: never;
|
|
131
|
+
cookie?: never;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Get Model Details (OpenAI Compatible)
|
|
135
|
+
* @description Retrieves details for a specific model by ID in OpenAI API compatible format. The model ID can be a user alias, model alias, or API provider alias.
|
|
136
|
+
*/
|
|
137
|
+
get: operations["getModel"];
|
|
138
|
+
put?: never;
|
|
139
|
+
post?: never;
|
|
140
|
+
delete?: never;
|
|
141
|
+
options?: never;
|
|
142
|
+
head?: never;
|
|
143
|
+
patch?: never;
|
|
144
|
+
trace?: never;
|
|
145
|
+
};
|
|
146
|
+
"/v1/responses": {
|
|
147
|
+
parameters: {
|
|
148
|
+
query?: never;
|
|
149
|
+
header?: never;
|
|
150
|
+
path?: never;
|
|
151
|
+
cookie?: never;
|
|
152
|
+
};
|
|
153
|
+
get?: never;
|
|
154
|
+
put?: never;
|
|
155
|
+
/**
|
|
156
|
+
* Create Response (OpenAI Responses API)
|
|
157
|
+
* @description Creates a model response using the Responses API format. Proxied to the upstream provider. Supports both streaming and non-streaming responses.
|
|
158
|
+
*/
|
|
159
|
+
post: operations["createResponse"];
|
|
160
|
+
delete?: never;
|
|
161
|
+
options?: never;
|
|
162
|
+
head?: never;
|
|
163
|
+
patch?: never;
|
|
164
|
+
trace?: never;
|
|
165
|
+
};
|
|
166
|
+
"/v1/responses/{response_id}": {
|
|
167
|
+
parameters: {
|
|
168
|
+
query?: never;
|
|
169
|
+
header?: never;
|
|
170
|
+
path?: never;
|
|
171
|
+
cookie?: never;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Retrieve Response
|
|
175
|
+
* @description Retrieves a previously created response by ID. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
|
|
176
|
+
*/
|
|
177
|
+
get: operations["getResponse"];
|
|
178
|
+
put?: never;
|
|
179
|
+
post?: never;
|
|
180
|
+
/**
|
|
181
|
+
* Delete Response
|
|
182
|
+
* @description Deletes a stored response by ID. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
|
|
183
|
+
*/
|
|
184
|
+
delete: operations["deleteResponse"];
|
|
185
|
+
options?: never;
|
|
186
|
+
head?: never;
|
|
187
|
+
patch?: never;
|
|
188
|
+
trace?: never;
|
|
189
|
+
};
|
|
190
|
+
"/v1/responses/{response_id}/cancel": {
|
|
191
|
+
parameters: {
|
|
192
|
+
query?: never;
|
|
193
|
+
header?: never;
|
|
194
|
+
path?: never;
|
|
195
|
+
cookie?: never;
|
|
196
|
+
};
|
|
197
|
+
get?: never;
|
|
198
|
+
put?: never;
|
|
199
|
+
/**
|
|
200
|
+
* Cancel Response
|
|
201
|
+
* @description Cancels a background response. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
|
|
202
|
+
*/
|
|
203
|
+
post: operations["cancelResponse"];
|
|
204
|
+
delete?: never;
|
|
205
|
+
options?: never;
|
|
206
|
+
head?: never;
|
|
207
|
+
patch?: never;
|
|
208
|
+
trace?: never;
|
|
209
|
+
};
|
|
210
|
+
"/v1/responses/{response_id}/input_items": {
|
|
211
|
+
parameters: {
|
|
212
|
+
query?: never;
|
|
213
|
+
header?: never;
|
|
214
|
+
path?: never;
|
|
215
|
+
cookie?: never;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* List Response Input Items
|
|
219
|
+
* @description Lists input items for a given response. Note: `model` query parameter is required for multi-provider routing (not part of upstream OpenAI API).
|
|
220
|
+
*/
|
|
221
|
+
get: operations["listResponseInputItems"];
|
|
222
|
+
put?: never;
|
|
223
|
+
post?: never;
|
|
224
|
+
delete?: never;
|
|
225
|
+
options?: never;
|
|
226
|
+
head?: never;
|
|
227
|
+
patch?: never;
|
|
228
|
+
trace?: never;
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
export type webhooks = Record<string, never>;
|
|
232
|
+
export interface components {
|
|
233
|
+
schemas: {
|
|
234
|
+
/** @description An annotation that applies to a span of output text. */
|
|
235
|
+
Annotation: (components["schemas"]["FileCitationBody"] & {
|
|
236
|
+
/** @enum {string} */
|
|
237
|
+
type: "file_citation";
|
|
238
|
+
}) | (components["schemas"]["UrlCitationBody"] & {
|
|
239
|
+
/** @enum {string} */
|
|
240
|
+
type: "url_citation";
|
|
241
|
+
}) | (components["schemas"]["ContainerFileCitationBody"] & {
|
|
242
|
+
/** @enum {string} */
|
|
243
|
+
type: "container_file_citation";
|
|
244
|
+
}) | (components["schemas"]["FilePath"] & {
|
|
245
|
+
/** @enum {string} */
|
|
246
|
+
type: "file_path";
|
|
247
|
+
});
|
|
248
|
+
/** @description OpenAI API returns error object on failure */
|
|
249
|
+
ApiError: {
|
|
250
|
+
message: string;
|
|
251
|
+
type?: string | null;
|
|
252
|
+
param?: string | null;
|
|
253
|
+
code?: string | null;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* @description Outcome values reported for apply_patch tool call outputs.
|
|
257
|
+
* @enum {string}
|
|
258
|
+
*/
|
|
259
|
+
ApplyPatchCallOutputStatus: "completed" | "failed";
|
|
260
|
+
/**
|
|
261
|
+
* @description Outcome values reported for apply_patch tool call outputs.
|
|
262
|
+
* @enum {string}
|
|
263
|
+
*/
|
|
264
|
+
ApplyPatchCallOutputStatusParam: "completed" | "failed";
|
|
265
|
+
/**
|
|
266
|
+
* @description Status values reported for apply_patch tool calls.
|
|
267
|
+
* @enum {string}
|
|
268
|
+
*/
|
|
269
|
+
ApplyPatchCallStatus: "in_progress" | "completed";
|
|
270
|
+
/**
|
|
271
|
+
* @description Status values reported for apply_patch tool calls.
|
|
272
|
+
* @enum {string}
|
|
273
|
+
*/
|
|
274
|
+
ApplyPatchCallStatusParam: "in_progress" | "completed";
|
|
275
|
+
/** @description Instruction describing how to create a file via the apply_patch tool. */
|
|
276
|
+
ApplyPatchCreateFileOperation: {
|
|
277
|
+
/** @description Path of the file to create. */
|
|
278
|
+
path: string;
|
|
279
|
+
/** @description Diff to apply. */
|
|
280
|
+
diff: string;
|
|
281
|
+
};
|
|
282
|
+
/** @description Instruction for creating a new file via the apply_patch tool. */
|
|
283
|
+
ApplyPatchCreateFileOperationParam: {
|
|
284
|
+
/** @description Path of the file to create relative to the workspace root. */
|
|
285
|
+
path: string;
|
|
286
|
+
/** @description Unified diff content to apply when creating the file. */
|
|
287
|
+
diff: string;
|
|
288
|
+
};
|
|
289
|
+
/** @description Instruction describing how to delete a file via the apply_patch tool. */
|
|
290
|
+
ApplyPatchDeleteFileOperation: {
|
|
291
|
+
/** @description Path of the file to delete. */
|
|
292
|
+
path: string;
|
|
293
|
+
};
|
|
294
|
+
/** @description Instruction for deleting an existing file via the apply_patch tool. */
|
|
295
|
+
ApplyPatchDeleteFileOperationParam: {
|
|
296
|
+
/** @description Path of the file to delete relative to the workspace root. */
|
|
297
|
+
path: string;
|
|
298
|
+
};
|
|
299
|
+
/** @description One of the create_file, delete_file, or update_file operations applied via apply_patch. */
|
|
300
|
+
ApplyPatchOperation: (components["schemas"]["ApplyPatchCreateFileOperation"] & {
|
|
301
|
+
/** @enum {string} */
|
|
302
|
+
type: "create_file";
|
|
303
|
+
}) | (components["schemas"]["ApplyPatchDeleteFileOperation"] & {
|
|
304
|
+
/** @enum {string} */
|
|
305
|
+
type: "delete_file";
|
|
306
|
+
}) | (components["schemas"]["ApplyPatchUpdateFileOperation"] & {
|
|
307
|
+
/** @enum {string} */
|
|
308
|
+
type: "update_file";
|
|
309
|
+
});
|
|
310
|
+
/** @description One of the create_file, delete_file, or update_file operations supplied to the apply_patch tool. */
|
|
311
|
+
ApplyPatchOperationParam: (components["schemas"]["ApplyPatchCreateFileOperationParam"] & {
|
|
312
|
+
/** @enum {string} */
|
|
313
|
+
type: "create_file";
|
|
314
|
+
}) | (components["schemas"]["ApplyPatchDeleteFileOperationParam"] & {
|
|
315
|
+
/** @enum {string} */
|
|
316
|
+
type: "delete_file";
|
|
317
|
+
}) | (components["schemas"]["ApplyPatchUpdateFileOperationParam"] & {
|
|
318
|
+
/** @enum {string} */
|
|
319
|
+
type: "update_file";
|
|
320
|
+
});
|
|
321
|
+
/** @description A tool call that applies file diffs by creating, deleting, or updating files. */
|
|
322
|
+
ApplyPatchToolCall: {
|
|
323
|
+
/** @description The unique ID of the apply patch tool call. Populated when this item is returned via API. */
|
|
324
|
+
id: string;
|
|
325
|
+
/** @description The unique ID of the apply patch tool call generated by the model. */
|
|
326
|
+
call_id: string;
|
|
327
|
+
/** @description The status of the apply patch tool call. One of `in_progress` or `completed`. */
|
|
328
|
+
status: components["schemas"]["ApplyPatchCallStatus"];
|
|
329
|
+
/** @description One of the create_file, delete_file, or update_file operations applied via apply_patch. */
|
|
330
|
+
operation: components["schemas"]["ApplyPatchOperation"];
|
|
331
|
+
/** @description The ID of the entity that created this tool call. */
|
|
332
|
+
created_by?: string | null;
|
|
333
|
+
};
|
|
334
|
+
/** @description A tool call representing a request to create, delete, or update files using diff patches. */
|
|
335
|
+
ApplyPatchToolCallItemParam: {
|
|
336
|
+
/** @description The unique ID of the apply patch tool call. Populated when this item is returned via API. */
|
|
337
|
+
id?: string | null;
|
|
338
|
+
/** @description The unique ID of the apply patch tool call generated by the model. */
|
|
339
|
+
call_id: string;
|
|
340
|
+
/** @description The status of the apply patch tool call. One of `in_progress` or `completed`. */
|
|
341
|
+
status: components["schemas"]["ApplyPatchCallStatusParam"];
|
|
342
|
+
/** @description The specific create, delete, or update instruction for the apply_patch tool call. */
|
|
343
|
+
operation: components["schemas"]["ApplyPatchOperationParam"];
|
|
344
|
+
};
|
|
345
|
+
/** @description The output emitted by an apply patch tool call. */
|
|
346
|
+
ApplyPatchToolCallOutput: {
|
|
347
|
+
/** @description The unique ID of the apply patch tool call output. Populated when this item is returned via API. */
|
|
348
|
+
id: string;
|
|
349
|
+
/** @description The unique ID of the apply patch tool call generated by the model. */
|
|
350
|
+
call_id: string;
|
|
351
|
+
/** @description The status of the apply patch tool call output. One of `completed` or `failed`. */
|
|
352
|
+
status: components["schemas"]["ApplyPatchCallOutputStatus"];
|
|
353
|
+
/** @description Optional textual output returned by the apply patch tool. */
|
|
354
|
+
output?: string | null;
|
|
355
|
+
/** @description The ID of the entity that created this tool call output. */
|
|
356
|
+
created_by?: string | null;
|
|
357
|
+
};
|
|
358
|
+
/** @description The streamed output emitted by an apply patch tool call. */
|
|
359
|
+
ApplyPatchToolCallOutputItemParam: {
|
|
360
|
+
/** @description The unique ID of the apply patch tool call output. Populated when this item is returned via API. */
|
|
361
|
+
id?: string | null;
|
|
362
|
+
/** @description The unique ID of the apply patch tool call generated by the model. */
|
|
363
|
+
call_id: string;
|
|
364
|
+
/** @description The status of the apply patch tool call output. One of `completed` or `failed`. */
|
|
365
|
+
status: components["schemas"]["ApplyPatchCallOutputStatusParam"];
|
|
366
|
+
/** @description Optional human-readable log text from the apply patch tool (e.g., patch results or errors). */
|
|
367
|
+
output?: string | null;
|
|
368
|
+
};
|
|
369
|
+
/** @description Instruction describing how to update a file via the apply_patch tool. */
|
|
370
|
+
ApplyPatchUpdateFileOperation: {
|
|
371
|
+
/** @description Path of the file to update. */
|
|
372
|
+
path: string;
|
|
373
|
+
/** @description Diff to apply. */
|
|
374
|
+
diff: string;
|
|
375
|
+
};
|
|
376
|
+
/** @description Instruction for updating an existing file via the apply_patch tool. */
|
|
377
|
+
ApplyPatchUpdateFileOperationParam: {
|
|
378
|
+
/** @description Path of the file to update relative to the workspace root. */
|
|
379
|
+
path: string;
|
|
380
|
+
/** @description Unified diff content to apply to the existing file. */
|
|
381
|
+
diff: string;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* @description The role for an output message - always `assistant`.
|
|
385
|
+
* This type ensures type safety by only allowing the assistant role.
|
|
386
|
+
* @enum {string}
|
|
387
|
+
*/
|
|
388
|
+
AssistantRole: "assistant";
|
|
389
|
+
Billing: {
|
|
390
|
+
payer: string;
|
|
391
|
+
};
|
|
392
|
+
ChatChoice: {
|
|
393
|
+
/**
|
|
394
|
+
* Format: int32
|
|
395
|
+
* @description The index of the choice in the list of choices.
|
|
396
|
+
*/
|
|
397
|
+
index: number;
|
|
398
|
+
message: components["schemas"]["ChatCompletionResponseMessage"];
|
|
399
|
+
finish_reason?: null | components["schemas"]["FinishReason"];
|
|
400
|
+
logprobs?: null | components["schemas"]["ChatChoiceLogprobs"];
|
|
401
|
+
};
|
|
402
|
+
ChatChoiceLogprobs: {
|
|
403
|
+
/** @description A list of message content tokens with log probability information. */
|
|
404
|
+
content?: components["schemas"]["ChatCompletionTokenLogprob"][] | null;
|
|
405
|
+
refusal?: components["schemas"]["ChatCompletionTokenLogprob"][] | null;
|
|
406
|
+
};
|
|
407
|
+
ChatChoiceStream: {
|
|
408
|
+
/**
|
|
409
|
+
* Format: int32
|
|
410
|
+
* @description The index of the choice in the list of choices.
|
|
411
|
+
*/
|
|
412
|
+
index: number;
|
|
413
|
+
delta: components["schemas"]["ChatCompletionStreamResponseDelta"];
|
|
414
|
+
finish_reason?: null | components["schemas"]["FinishReason"];
|
|
415
|
+
logprobs?: null | components["schemas"]["ChatChoiceLogprobs"];
|
|
416
|
+
};
|
|
417
|
+
ChatCompletionAllowedTools: {
|
|
418
|
+
/** @description Constrains the tools available to the model to a pre-defined set.
|
|
419
|
+
*
|
|
420
|
+
* `auto` allows the model to pick from among the allowed tools and generate a
|
|
421
|
+
* message.
|
|
422
|
+
*
|
|
423
|
+
* `required` requires the model to call one or more of the allowed tools. */
|
|
424
|
+
mode: components["schemas"]["ToolChoiceAllowedMode"];
|
|
425
|
+
/** @description A list of tool definitions that the model should be allowed to call.
|
|
426
|
+
*
|
|
427
|
+
* For the Chat Completions API, the list of tool definitions might look like:
|
|
428
|
+
* ```json
|
|
429
|
+
* [
|
|
430
|
+
* { "type": "function", "function": { "name": "get_weather" } },
|
|
431
|
+
* { "type": "function", "function": { "name": "get_time" } }
|
|
432
|
+
* ]
|
|
433
|
+
* ``` */
|
|
434
|
+
tools: Record<string, never>[];
|
|
435
|
+
};
|
|
436
|
+
ChatCompletionAllowedToolsChoice: {
|
|
437
|
+
allowed_tools: components["schemas"]["ChatCompletionAllowedTools"][];
|
|
438
|
+
};
|
|
439
|
+
ChatCompletionAudio: {
|
|
440
|
+
/** @description The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
|
|
441
|
+
* `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and `cedar`. */
|
|
442
|
+
voice: components["schemas"]["ChatCompletionAudioVoice"];
|
|
443
|
+
/** @description Specifies the output audio format. Must be one of `wav`, `aac`, `mp3`, `flac`, `opus`, or `pcm16`. */
|
|
444
|
+
format: components["schemas"]["ChatCompletionAudioFormat"];
|
|
445
|
+
};
|
|
446
|
+
/** @enum {string} */
|
|
447
|
+
ChatCompletionAudioFormat: "wav" | "aac" | "mp3" | "flac" | "opus" | "pcm16";
|
|
448
|
+
ChatCompletionAudioVoice: "alloy" | "ash" | "ballad" | "coral" | "echo" | "fable" | "nova" | "onyx" | "sage" | "shimmer" | {
|
|
449
|
+
other: string;
|
|
450
|
+
};
|
|
451
|
+
ChatCompletionFunctionCall: "none" | "auto" | {
|
|
452
|
+
/** @description Forces the model to call the specified function. */
|
|
453
|
+
Function: {
|
|
454
|
+
name: string;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
ChatCompletionFunctions: {
|
|
458
|
+
/** @description The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */
|
|
459
|
+
name: string;
|
|
460
|
+
/** @description A description of what the function does, used by the model to choose when and how to call the function. */
|
|
461
|
+
description?: string | null;
|
|
462
|
+
/** @description The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
463
|
+
*
|
|
464
|
+
* Omitting `parameters` defines a function with an empty parameter list. */
|
|
465
|
+
parameters: Record<string, never>;
|
|
466
|
+
};
|
|
467
|
+
ChatCompletionMessageCustomToolCall: {
|
|
468
|
+
/** @description The ID of the tool call. */
|
|
469
|
+
id: string;
|
|
470
|
+
/** @description The custom tool that the model called. */
|
|
471
|
+
custom_tool: components["schemas"]["CustomTool"];
|
|
472
|
+
};
|
|
473
|
+
ChatCompletionMessageToolCall: {
|
|
474
|
+
/** @description The ID of the tool call. */
|
|
475
|
+
id: string;
|
|
476
|
+
/** @description The function that the model called. */
|
|
477
|
+
function: components["schemas"]["FunctionCall"];
|
|
478
|
+
};
|
|
479
|
+
ChatCompletionMessageToolCallChunk: {
|
|
480
|
+
/** Format: int32 */
|
|
481
|
+
index: number;
|
|
482
|
+
/** @description The ID of the tool call. */
|
|
483
|
+
id?: string | null;
|
|
484
|
+
type?: null | components["schemas"]["FunctionType"];
|
|
485
|
+
function?: null | components["schemas"]["FunctionCallStream"];
|
|
486
|
+
};
|
|
487
|
+
ChatCompletionMessageToolCalls: (components["schemas"]["ChatCompletionMessageToolCall"] & {
|
|
488
|
+
/** @enum {string} */
|
|
489
|
+
type: "function";
|
|
490
|
+
}) | (components["schemas"]["ChatCompletionMessageCustomToolCall"] & {
|
|
491
|
+
/** @enum {string} */
|
|
492
|
+
type: "custom";
|
|
493
|
+
});
|
|
494
|
+
/** @description Specifies a tool the model should use. Use to force the model to call a specific function. */
|
|
495
|
+
ChatCompletionNamedToolChoice: {
|
|
496
|
+
function: components["schemas"]["FunctionName"];
|
|
497
|
+
};
|
|
498
|
+
ChatCompletionNamedToolChoiceCustom: {
|
|
499
|
+
custom: components["schemas"]["CustomName"];
|
|
500
|
+
};
|
|
501
|
+
ChatCompletionRequestAssistantMessage: {
|
|
502
|
+
content?: null | components["schemas"]["ChatCompletionRequestAssistantMessageContent"];
|
|
503
|
+
/** @description The refusal message by the assistant. */
|
|
504
|
+
refusal?: string | null;
|
|
505
|
+
/** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
|
|
506
|
+
name?: string | null;
|
|
507
|
+
audio?: null | components["schemas"]["ChatCompletionRequestAssistantMessageAudio"];
|
|
508
|
+
tool_calls?: components["schemas"]["ChatCompletionMessageToolCalls"][] | null;
|
|
509
|
+
function_call?: null | components["schemas"]["FunctionCall"];
|
|
510
|
+
};
|
|
511
|
+
ChatCompletionRequestAssistantMessageAudio: {
|
|
512
|
+
/** @description Unique identifier for a previous audio response from the model. */
|
|
513
|
+
id: string;
|
|
514
|
+
};
|
|
515
|
+
ChatCompletionRequestAssistantMessageContent: string | components["schemas"]["ChatCompletionRequestAssistantMessageContentPart"][];
|
|
516
|
+
ChatCompletionRequestAssistantMessageContentPart: (components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
|
|
517
|
+
/** @enum {string} */
|
|
518
|
+
type: "text";
|
|
519
|
+
}) | (components["schemas"]["ChatCompletionRequestMessageContentPartRefusal"] & {
|
|
520
|
+
/** @enum {string} */
|
|
521
|
+
type: "refusal";
|
|
522
|
+
});
|
|
523
|
+
ChatCompletionRequestDeveloperMessage: {
|
|
524
|
+
/** @description The contents of the developer message. */
|
|
525
|
+
content: components["schemas"]["ChatCompletionRequestDeveloperMessageContent"];
|
|
526
|
+
/** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
|
|
527
|
+
name?: string | null;
|
|
528
|
+
};
|
|
529
|
+
ChatCompletionRequestDeveloperMessageContent: string | components["schemas"]["ChatCompletionRequestDeveloperMessageContentPart"][];
|
|
530
|
+
ChatCompletionRequestDeveloperMessageContentPart: components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
|
|
531
|
+
/** @enum {string} */
|
|
532
|
+
type: "text";
|
|
533
|
+
};
|
|
534
|
+
ChatCompletionRequestFunctionMessage: {
|
|
535
|
+
/** @description The return value from the function call, to return to the model. */
|
|
536
|
+
content?: string | null;
|
|
537
|
+
/** @description The name of the function to call. */
|
|
538
|
+
name: string;
|
|
539
|
+
};
|
|
540
|
+
ChatCompletionRequestMessage: (components["schemas"]["ChatCompletionRequestDeveloperMessage"] & {
|
|
541
|
+
/** @enum {string} */
|
|
542
|
+
role: "developer";
|
|
543
|
+
}) | (components["schemas"]["ChatCompletionRequestSystemMessage"] & {
|
|
544
|
+
/** @enum {string} */
|
|
545
|
+
role: "system";
|
|
546
|
+
}) | (components["schemas"]["ChatCompletionRequestUserMessage"] & {
|
|
547
|
+
/** @enum {string} */
|
|
548
|
+
role: "user";
|
|
549
|
+
}) | (components["schemas"]["ChatCompletionRequestAssistantMessage"] & {
|
|
550
|
+
/** @enum {string} */
|
|
551
|
+
role: "assistant";
|
|
552
|
+
}) | (components["schemas"]["ChatCompletionRequestToolMessage"] & {
|
|
553
|
+
/** @enum {string} */
|
|
554
|
+
role: "tool";
|
|
555
|
+
}) | (components["schemas"]["ChatCompletionRequestFunctionMessage"] & {
|
|
556
|
+
/** @enum {string} */
|
|
557
|
+
role: "function";
|
|
558
|
+
});
|
|
559
|
+
/** @description Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */
|
|
560
|
+
ChatCompletionRequestMessageContentPartAudio: {
|
|
561
|
+
input_audio: components["schemas"]["InputAudio"];
|
|
562
|
+
};
|
|
563
|
+
ChatCompletionRequestMessageContentPartFile: {
|
|
564
|
+
file: components["schemas"]["FileObject"];
|
|
565
|
+
};
|
|
566
|
+
ChatCompletionRequestMessageContentPartImage: {
|
|
567
|
+
image_url: components["schemas"]["ImageUrl"];
|
|
568
|
+
};
|
|
569
|
+
ChatCompletionRequestMessageContentPartRefusal: {
|
|
570
|
+
/** @description The refusal message generated by the model. */
|
|
571
|
+
refusal: string;
|
|
572
|
+
};
|
|
573
|
+
ChatCompletionRequestMessageContentPartText: {
|
|
574
|
+
text: string;
|
|
575
|
+
};
|
|
576
|
+
ChatCompletionRequestSystemMessage: {
|
|
577
|
+
/** @description The contents of the system message. */
|
|
578
|
+
content: components["schemas"]["ChatCompletionRequestSystemMessageContent"];
|
|
579
|
+
/** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
|
|
580
|
+
name?: string | null;
|
|
581
|
+
};
|
|
582
|
+
ChatCompletionRequestSystemMessageContent: string | components["schemas"]["ChatCompletionRequestSystemMessageContentPart"][];
|
|
583
|
+
ChatCompletionRequestSystemMessageContentPart: components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
|
|
584
|
+
/** @enum {string} */
|
|
585
|
+
type: "text";
|
|
586
|
+
};
|
|
587
|
+
/** @description Tool message */
|
|
588
|
+
ChatCompletionRequestToolMessage: {
|
|
589
|
+
/** @description The contents of the tool message. */
|
|
590
|
+
content: components["schemas"]["ChatCompletionRequestToolMessageContent"];
|
|
591
|
+
tool_call_id: string;
|
|
592
|
+
};
|
|
593
|
+
ChatCompletionRequestToolMessageContent: string | components["schemas"]["ChatCompletionRequestToolMessageContentPart"][];
|
|
594
|
+
ChatCompletionRequestToolMessageContentPart: components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
|
|
595
|
+
/** @enum {string} */
|
|
596
|
+
type: "text";
|
|
597
|
+
};
|
|
598
|
+
ChatCompletionRequestUserMessage: {
|
|
599
|
+
/** @description The contents of the user message. */
|
|
600
|
+
content: components["schemas"]["ChatCompletionRequestUserMessageContent"];
|
|
601
|
+
/** @description An optional name for the participant. Provides the model information to differentiate between participants of the same role. */
|
|
602
|
+
name?: string | null;
|
|
603
|
+
};
|
|
604
|
+
ChatCompletionRequestUserMessageContent: string | components["schemas"]["ChatCompletionRequestUserMessageContentPart"][];
|
|
605
|
+
ChatCompletionRequestUserMessageContentPart: (components["schemas"]["ChatCompletionRequestMessageContentPartText"] & {
|
|
606
|
+
/** @enum {string} */
|
|
607
|
+
type: "text";
|
|
608
|
+
}) | (components["schemas"]["ChatCompletionRequestMessageContentPartImage"] & {
|
|
609
|
+
/** @enum {string} */
|
|
610
|
+
type: "image_url";
|
|
611
|
+
}) | (components["schemas"]["ChatCompletionRequestMessageContentPartAudio"] & {
|
|
612
|
+
/** @enum {string} */
|
|
613
|
+
type: "input_audio";
|
|
614
|
+
}) | (components["schemas"]["ChatCompletionRequestMessageContentPartFile"] & {
|
|
615
|
+
/** @enum {string} */
|
|
616
|
+
type: "file";
|
|
617
|
+
});
|
|
618
|
+
/** @description A chat completion message generated by the model. */
|
|
619
|
+
ChatCompletionResponseMessage: {
|
|
620
|
+
/** @description The contents of the message. */
|
|
621
|
+
content?: string | null;
|
|
622
|
+
/** @description The refusal message generated by the model. */
|
|
623
|
+
refusal?: string | null;
|
|
624
|
+
/** @description The tool calls generated by the model, such as function calls. */
|
|
625
|
+
tool_calls?: components["schemas"]["ChatCompletionMessageToolCalls"][] | null;
|
|
626
|
+
annotations?: components["schemas"]["ChatCompletionResponseMessageAnnotation"][] | null;
|
|
627
|
+
/** @description The role of the author of this message. */
|
|
628
|
+
role: components["schemas"]["Role"];
|
|
629
|
+
function_call?: null | components["schemas"]["FunctionCall"];
|
|
630
|
+
audio?: null | components["schemas"]["ChatCompletionResponseMessageAudio"];
|
|
631
|
+
};
|
|
632
|
+
ChatCompletionResponseMessageAnnotation: {
|
|
633
|
+
url_citation: components["schemas"]["UrlCitation"];
|
|
634
|
+
/** @enum {string} */
|
|
635
|
+
type: "url_citation";
|
|
636
|
+
};
|
|
637
|
+
ChatCompletionResponseMessageAudio: {
|
|
638
|
+
/** @description Unique identifier for this audio response. */
|
|
639
|
+
id: string;
|
|
640
|
+
/**
|
|
641
|
+
* Format: int64
|
|
642
|
+
* @description The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
|
|
643
|
+
*/
|
|
644
|
+
expires_at: number;
|
|
645
|
+
/** @description Base64 encoded audio bytes generated by the model, in the format specified in the request. */
|
|
646
|
+
data: string;
|
|
647
|
+
/** @description Transcript of the audio generated by the model. */
|
|
648
|
+
transcript: string;
|
|
649
|
+
};
|
|
650
|
+
/** @description Options for streaming response. Only set this when you set `stream: true`. */
|
|
651
|
+
ChatCompletionStreamOptions: {
|
|
652
|
+
/** @description If set, an additional chunk will be streamed before the `data: [DONE]`
|
|
653
|
+
* message. The `usage` field on this chunk shows the token usage statistics
|
|
654
|
+
* for the entire request, and the `choices` field will always be an empty
|
|
655
|
+
* array.
|
|
656
|
+
*
|
|
657
|
+
* All other chunks will also include a `usage` field, but with a null
|
|
658
|
+
* value. **NOTE:** If the stream is interrupted, you may not receive the
|
|
659
|
+
* final usage chunk which contains the total token usage for the request. */
|
|
660
|
+
include_usage?: boolean | null;
|
|
661
|
+
/** @description When true, stream obfuscation will be enabled. Stream obfuscation adds
|
|
662
|
+
* random characters to an `obfuscation` field on streaming delta events to
|
|
663
|
+
* normalize payload sizes as a mitigation to certain side-channel attacks.
|
|
664
|
+
* These obfuscation fields are included by default, but add a small amount
|
|
665
|
+
* of overhead to the data stream. You can set `include_obfuscation` to
|
|
666
|
+
* false to optimize for bandwidth if you trust the network links between
|
|
667
|
+
* your application and the OpenAI API. */
|
|
668
|
+
include_obfuscation?: boolean | null;
|
|
669
|
+
};
|
|
670
|
+
/** @description A chat completion delta generated by streamed model responses. */
|
|
671
|
+
ChatCompletionStreamResponseDelta: {
|
|
672
|
+
/** @description The contents of the chunk message. */
|
|
673
|
+
content?: string | null;
|
|
674
|
+
function_call?: null | components["schemas"]["FunctionCallStream"];
|
|
675
|
+
tool_calls?: components["schemas"]["ChatCompletionMessageToolCallChunk"][] | null;
|
|
676
|
+
role?: null | components["schemas"]["Role"];
|
|
677
|
+
/** @description The refusal message generated by the model. */
|
|
678
|
+
refusal?: string | null;
|
|
679
|
+
};
|
|
680
|
+
ChatCompletionTokenLogprob: {
|
|
681
|
+
/** @description The token. */
|
|
682
|
+
token: string;
|
|
683
|
+
/**
|
|
684
|
+
* Format: float
|
|
685
|
+
* @description The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
|
|
686
|
+
*/
|
|
687
|
+
logprob: number;
|
|
688
|
+
/** @description A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */
|
|
689
|
+
bytes?: number[] | null;
|
|
690
|
+
/** @description List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. */
|
|
691
|
+
top_logprobs: components["schemas"]["TopLogprobs"][];
|
|
692
|
+
};
|
|
693
|
+
ChatCompletionTool: {
|
|
694
|
+
function: components["schemas"]["FunctionObject"];
|
|
695
|
+
};
|
|
696
|
+
/** @description Controls which (if any) tool is called by the model.
|
|
697
|
+
* `none` means the model will not call any tool and instead generates a message.
|
|
698
|
+
* `auto` means the model can pick between generating a message or calling one or more tools.
|
|
699
|
+
* `required` means the model must call one or more tools.
|
|
700
|
+
* Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
|
|
701
|
+
*
|
|
702
|
+
* `none` is the default when no tools are present. `auto` is the default if tools are present. */
|
|
703
|
+
ChatCompletionToolChoiceOption: (components["schemas"]["ChatCompletionAllowedToolsChoice"] & {
|
|
704
|
+
/** @enum {string} */
|
|
705
|
+
type: "allowed_tools";
|
|
706
|
+
}) | (components["schemas"]["ChatCompletionNamedToolChoice"] & {
|
|
707
|
+
/** @enum {string} */
|
|
708
|
+
type: "function";
|
|
709
|
+
}) | (components["schemas"]["ChatCompletionNamedToolChoiceCustom"] & {
|
|
710
|
+
/** @enum {string} */
|
|
711
|
+
type: "custom";
|
|
712
|
+
}) | (components["schemas"]["ToolChoiceOptions"] & {
|
|
713
|
+
/** @enum {string} */
|
|
714
|
+
type: "mode";
|
|
715
|
+
});
|
|
716
|
+
ChatCompletionTools: (components["schemas"]["ChatCompletionTool"] & {
|
|
717
|
+
/** @enum {string} */
|
|
718
|
+
type: "function";
|
|
719
|
+
}) | (components["schemas"]["CustomToolChatCompletions"] & {
|
|
720
|
+
/** @enum {string} */
|
|
721
|
+
type: "custom";
|
|
722
|
+
});
|
|
723
|
+
ChatRequest: {
|
|
724
|
+
model: string;
|
|
725
|
+
messages: components["schemas"]["Message"][];
|
|
726
|
+
stream?: boolean | null;
|
|
727
|
+
format?: string | null;
|
|
728
|
+
keep_alive?: null | components["schemas"]["Duration"];
|
|
729
|
+
options?: null | components["schemas"]["Options"];
|
|
730
|
+
};
|
|
731
|
+
/** @enum {string} */
|
|
732
|
+
ClickButtonType: "left" | "right" | "wheel" | "back" | "forward";
|
|
733
|
+
/** @description A click action. */
|
|
734
|
+
ClickParam: {
|
|
735
|
+
/** @description Indicates which mouse button was pressed during the click. One of `left`,
|
|
736
|
+
* `right`, `wheel`, `back`, or `forward`. */
|
|
737
|
+
button: components["schemas"]["ClickButtonType"];
|
|
738
|
+
/**
|
|
739
|
+
* Format: int32
|
|
740
|
+
* @description The x-coordinate where the click occurred.
|
|
741
|
+
*/
|
|
742
|
+
x: number;
|
|
743
|
+
/**
|
|
744
|
+
* Format: int32
|
|
745
|
+
* @description The y-coordinate where the click occurred.
|
|
746
|
+
*/
|
|
747
|
+
y: number;
|
|
748
|
+
};
|
|
749
|
+
/** @description Auto configuration for code interpreter container. */
|
|
750
|
+
CodeInterpreterContainerAuto: {
|
|
751
|
+
/** @description An optional list of uploaded files to make available to your code. */
|
|
752
|
+
file_ids?: string[] | null;
|
|
753
|
+
/** Format: int64 */
|
|
754
|
+
memory_limit?: number | null;
|
|
755
|
+
};
|
|
756
|
+
CodeInterpreterOutputImage: {
|
|
757
|
+
/** @description The URL of the image output from the code interpreter. */
|
|
758
|
+
url: string;
|
|
759
|
+
};
|
|
760
|
+
CodeInterpreterOutputLogs: {
|
|
761
|
+
/** @description The logs output from the code interpreter. */
|
|
762
|
+
logs: string;
|
|
763
|
+
};
|
|
764
|
+
CodeInterpreterTool: {
|
|
765
|
+
/** @description The code interpreter container. Can be a container ID or an object that
|
|
766
|
+
* specifies uploaded file IDs to make available to your code, along with an
|
|
767
|
+
* optional `memory_limit` setting. */
|
|
768
|
+
container: components["schemas"]["CodeInterpreterToolContainer"];
|
|
769
|
+
};
|
|
770
|
+
/** @description Output of a code interpreter request. */
|
|
771
|
+
CodeInterpreterToolCall: {
|
|
772
|
+
/** @description The code to run, or null if not available. */
|
|
773
|
+
code?: string | null;
|
|
774
|
+
/** @description ID of the container used to run the code. */
|
|
775
|
+
container_id: string;
|
|
776
|
+
/** @description The unique ID of the code interpreter tool call. */
|
|
777
|
+
id: string;
|
|
778
|
+
/** @description The outputs generated by the code interpreter, such as logs or images.
|
|
779
|
+
* Can be null if no outputs are available. */
|
|
780
|
+
outputs?: components["schemas"]["CodeInterpreterToolCallOutput"][] | null;
|
|
781
|
+
/** @description The status of the code interpreter tool call.
|
|
782
|
+
* Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. */
|
|
783
|
+
status: components["schemas"]["CodeInterpreterToolCallStatus"];
|
|
784
|
+
};
|
|
785
|
+
/** @description Individual result from a code interpreter: either logs or files. */
|
|
786
|
+
CodeInterpreterToolCallOutput: (components["schemas"]["CodeInterpreterOutputLogs"] & {
|
|
787
|
+
/** @enum {string} */
|
|
788
|
+
type: "logs";
|
|
789
|
+
}) | (components["schemas"]["CodeInterpreterOutputImage"] & {
|
|
790
|
+
/** @enum {string} */
|
|
791
|
+
type: "image";
|
|
792
|
+
});
|
|
793
|
+
/** @enum {string} */
|
|
794
|
+
CodeInterpreterToolCallStatus: "in_progress" | "completed" | "incomplete" | "interpreting" | "failed";
|
|
795
|
+
/** @description Container configuration for a code interpreter. */
|
|
796
|
+
CodeInterpreterToolContainer: (components["schemas"]["CodeInterpreterContainerAuto"] & {
|
|
797
|
+
/** @enum {string} */
|
|
798
|
+
type: "auto";
|
|
799
|
+
}) | {
|
|
800
|
+
/** @enum {string} */
|
|
801
|
+
type: "container_i_d";
|
|
802
|
+
};
|
|
803
|
+
/** @description A compaction item generated by the `/v1/responses/compact` API. */
|
|
804
|
+
CompactionBody: {
|
|
805
|
+
/** @description The unique ID of the compaction item. */
|
|
806
|
+
id: string;
|
|
807
|
+
/** @description The encrypted content that was produced by compaction. */
|
|
808
|
+
encrypted_content: string;
|
|
809
|
+
/** @description The identifier of the actor that created the item. */
|
|
810
|
+
created_by?: string | null;
|
|
811
|
+
};
|
|
812
|
+
/** @description A compaction item generated by the `/v1/responses/compact` API. */
|
|
813
|
+
CompactionSummaryItemParam: {
|
|
814
|
+
/** @description The ID of the compaction item. */
|
|
815
|
+
id?: string | null;
|
|
816
|
+
/** @description The encrypted content of the compaction summary. */
|
|
817
|
+
encrypted_content: string;
|
|
818
|
+
};
|
|
819
|
+
/** @description Single comparison filter. */
|
|
820
|
+
ComparisonFilter: {
|
|
821
|
+
/** @description Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
|
|
822
|
+
* - `eq`: equals
|
|
823
|
+
* - `ne`: not equal
|
|
824
|
+
* - `gt`: greater than
|
|
825
|
+
* - `gte`: greater than or equal
|
|
826
|
+
* - `lt`: less than
|
|
827
|
+
* - `lte`: less than or equal
|
|
828
|
+
* - `in`: in
|
|
829
|
+
* - `nin`: not in */
|
|
830
|
+
type: components["schemas"]["ComparisonType"];
|
|
831
|
+
/** @description The key to compare against the value. */
|
|
832
|
+
key: string;
|
|
833
|
+
/** @description The value to compare against the attribute key; supports string, number, or boolean types. */
|
|
834
|
+
value: Record<string, never>;
|
|
835
|
+
};
|
|
836
|
+
/** @enum {string} */
|
|
837
|
+
ComparisonType: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "in" | "nin";
|
|
838
|
+
/** @description Breakdown of tokens used in a completion. */
|
|
839
|
+
CompletionTokensDetails: {
|
|
840
|
+
/** Format: int32 */
|
|
841
|
+
accepted_prediction_tokens?: number | null;
|
|
842
|
+
/**
|
|
843
|
+
* Format: int32
|
|
844
|
+
* @description Audio input tokens generated by the model.
|
|
845
|
+
*/
|
|
846
|
+
audio_tokens?: number | null;
|
|
847
|
+
/**
|
|
848
|
+
* Format: int32
|
|
849
|
+
* @description Tokens generated by the model for reasoning.
|
|
850
|
+
*/
|
|
851
|
+
reasoning_tokens?: number | null;
|
|
852
|
+
/**
|
|
853
|
+
* Format: int32
|
|
854
|
+
* @description When using Predicted Outputs, the number of tokens in the
|
|
855
|
+
* prediction that did not appear in the completion. However, like
|
|
856
|
+
* reasoning tokens, these tokens are still counted in the total
|
|
857
|
+
* completion tokens for purposes of billing, output, and context
|
|
858
|
+
* window limits.
|
|
859
|
+
*/
|
|
860
|
+
rejected_prediction_tokens?: number | null;
|
|
861
|
+
};
|
|
862
|
+
/** @description Usage statistics for the completion request. */
|
|
863
|
+
CompletionUsage: {
|
|
864
|
+
/**
|
|
865
|
+
* Format: int32
|
|
866
|
+
* @description Number of tokens in the prompt.
|
|
867
|
+
*/
|
|
868
|
+
prompt_tokens: number;
|
|
869
|
+
/**
|
|
870
|
+
* Format: int32
|
|
871
|
+
* @description Number of tokens in the generated completion.
|
|
872
|
+
*/
|
|
873
|
+
completion_tokens: number;
|
|
874
|
+
/**
|
|
875
|
+
* Format: int32
|
|
876
|
+
* @description Total number of tokens used in the request (prompt + completion).
|
|
877
|
+
*/
|
|
878
|
+
total_tokens: number;
|
|
879
|
+
prompt_tokens_details?: null | components["schemas"]["PromptTokensDetails"];
|
|
880
|
+
completion_tokens_details?: null | components["schemas"]["CompletionTokensDetails"];
|
|
881
|
+
};
|
|
882
|
+
/** @description Combine multiple filters using `and` or `or`. */
|
|
883
|
+
CompoundFilter: {
|
|
884
|
+
/** @description 'Type of operation: `and` or `or`.' */
|
|
885
|
+
type: components["schemas"]["CompoundType"];
|
|
886
|
+
/** @description Array of filters to combine. Items can be ComparisonFilter or CompoundFilter. */
|
|
887
|
+
filters: Record<string, never>[];
|
|
888
|
+
};
|
|
889
|
+
/** @enum {string} */
|
|
890
|
+
CompoundType: "and" | "or";
|
|
891
|
+
/** @description Represents all user‐triggered actions. */
|
|
892
|
+
ComputerAction: (components["schemas"]["ClickParam"] & {
|
|
893
|
+
/** @enum {string} */
|
|
894
|
+
type: "click";
|
|
895
|
+
}) | (components["schemas"]["DoubleClickAction"] & {
|
|
896
|
+
/** @enum {string} */
|
|
897
|
+
type: "double_click";
|
|
898
|
+
}) | (components["schemas"]["DragParam"] & {
|
|
899
|
+
/** @enum {string} */
|
|
900
|
+
type: "drag";
|
|
901
|
+
}) | (components["schemas"]["KeyPressAction"] & {
|
|
902
|
+
/** @enum {string} */
|
|
903
|
+
type: "keypress";
|
|
904
|
+
}) | (components["schemas"]["MoveParam"] & {
|
|
905
|
+
/** @enum {string} */
|
|
906
|
+
type: "move";
|
|
907
|
+
}) | {
|
|
908
|
+
/** @enum {string} */
|
|
909
|
+
type: "screenshot";
|
|
910
|
+
} | (components["schemas"]["ScrollParam"] & {
|
|
911
|
+
/** @enum {string} */
|
|
912
|
+
type: "scroll";
|
|
913
|
+
}) | (components["schemas"]["TypeParam"] & {
|
|
914
|
+
/** @enum {string} */
|
|
915
|
+
type: "type";
|
|
916
|
+
}) | {
|
|
917
|
+
/** @enum {string} */
|
|
918
|
+
type: "wait";
|
|
919
|
+
};
|
|
920
|
+
ComputerCallOutputItemParam: {
|
|
921
|
+
/** @description The ID of the computer tool call that produced the output. */
|
|
922
|
+
call_id: string;
|
|
923
|
+
/** @description A computer screenshot image used with the computer use tool. */
|
|
924
|
+
output: components["schemas"]["ComputerScreenshotImage"];
|
|
925
|
+
/** @description The safety checks reported by the API that have been acknowledged by the developer. */
|
|
926
|
+
acknowledged_safety_checks?: components["schemas"]["ComputerCallSafetyCheckParam"][] | null;
|
|
927
|
+
/** @description The unique ID of the computer tool call output. Optional when creating. */
|
|
928
|
+
id?: string | null;
|
|
929
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
930
|
+
};
|
|
931
|
+
ComputerCallSafetyCheckParam: {
|
|
932
|
+
/** @description The ID of the pending safety check. */
|
|
933
|
+
id: string;
|
|
934
|
+
/** @description The type of the pending safety check. */
|
|
935
|
+
code?: string | null;
|
|
936
|
+
/** @description Details about the pending safety check. */
|
|
937
|
+
message?: string | null;
|
|
938
|
+
};
|
|
939
|
+
/** @enum {string} */
|
|
940
|
+
ComputerEnvironment: "windows" | "mac" | "linux" | "ubuntu" | "browser";
|
|
941
|
+
/** @description A computer screenshot image used with the computer use tool. */
|
|
942
|
+
ComputerScreenshotImage: {
|
|
943
|
+
/** @description Specifies the event type. For a computer screenshot, this property is always
|
|
944
|
+
* set to `computer_screenshot`. */
|
|
945
|
+
type: components["schemas"]["ComputerScreenshotImageType"];
|
|
946
|
+
/** @description The identifier of an uploaded file that contains the screenshot. */
|
|
947
|
+
file_id?: string | null;
|
|
948
|
+
/** @description The URL of the screenshot image. */
|
|
949
|
+
image_url?: string | null;
|
|
950
|
+
};
|
|
951
|
+
/** @enum {string} */
|
|
952
|
+
ComputerScreenshotImageType: "computer_screenshot";
|
|
953
|
+
/** @description A tool that controls a virtual computer. Learn more about the
|
|
954
|
+
* [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). */
|
|
955
|
+
ComputerTool: Record<string, never>;
|
|
956
|
+
/** @description Output from a computer tool call. */
|
|
957
|
+
ComputerToolCall: {
|
|
958
|
+
action?: null | components["schemas"]["ComputerAction"];
|
|
959
|
+
/** @description Flattened batched actions for `computer_use`. Each action includes a
|
|
960
|
+
* `type` discriminator and action-specific fields. */
|
|
961
|
+
actions?: components["schemas"]["ComputerAction"][] | null;
|
|
962
|
+
/** @description An identifier used when responding to the tool call with output. */
|
|
963
|
+
call_id: string;
|
|
964
|
+
/** @description The unique ID of the computer call. */
|
|
965
|
+
id: string;
|
|
966
|
+
/** @description The pending safety checks for the computer call. */
|
|
967
|
+
pending_safety_checks: components["schemas"]["ComputerCallSafetyCheckParam"][];
|
|
968
|
+
/** @description The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
969
|
+
* Populated when items are returned via API. */
|
|
970
|
+
status: components["schemas"]["OutputStatus"];
|
|
971
|
+
};
|
|
972
|
+
ComputerUsePreviewTool: {
|
|
973
|
+
/** @description The type of computer environment to control. */
|
|
974
|
+
environment: components["schemas"]["ComputerEnvironment"];
|
|
975
|
+
/**
|
|
976
|
+
* Format: int32
|
|
977
|
+
* @description The width of the computer display.
|
|
978
|
+
*/
|
|
979
|
+
display_width: number;
|
|
980
|
+
/**
|
|
981
|
+
* Format: int32
|
|
982
|
+
* @description The height of the computer display.
|
|
983
|
+
*/
|
|
984
|
+
display_height: number;
|
|
985
|
+
};
|
|
986
|
+
/** @description Automatically creates a container for the request. */
|
|
987
|
+
ContainerAutoParam: {
|
|
988
|
+
/** @description An optional list of uploaded file IDs to make available in the container. */
|
|
989
|
+
file_ids?: string[] | null;
|
|
990
|
+
network_policy?: null | components["schemas"]["ContainerNetworkPolicy"];
|
|
991
|
+
/** @description An optional list of skills to make available in the container. */
|
|
992
|
+
skills?: components["schemas"]["SkillParam"][] | null;
|
|
993
|
+
};
|
|
994
|
+
ContainerFileCitationBody: {
|
|
995
|
+
/** @description The ID of the container file. */
|
|
996
|
+
container_id: string;
|
|
997
|
+
/**
|
|
998
|
+
* Format: int32
|
|
999
|
+
* @description The index of the last character of the container file citation in the message.
|
|
1000
|
+
*/
|
|
1001
|
+
end_index: number;
|
|
1002
|
+
/** @description The ID of the file. */
|
|
1003
|
+
file_id: string;
|
|
1004
|
+
/** @description The filename of the container file cited. */
|
|
1005
|
+
filename: string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Format: int32
|
|
1008
|
+
* @description The index of the first character of the container file citation in the message.
|
|
1009
|
+
*/
|
|
1010
|
+
start_index: number;
|
|
1011
|
+
};
|
|
1012
|
+
/** @description Network access policy for a container. */
|
|
1013
|
+
ContainerNetworkPolicy: {
|
|
1014
|
+
/** @enum {string} */
|
|
1015
|
+
type: "disabled";
|
|
1016
|
+
} | (components["schemas"]["ContainerNetworkPolicyAllowlistDetails"] & {
|
|
1017
|
+
/** @enum {string} */
|
|
1018
|
+
type: "allowlist";
|
|
1019
|
+
});
|
|
1020
|
+
/** @description Details for an allowlist network policy. */
|
|
1021
|
+
ContainerNetworkPolicyAllowlistDetails: {
|
|
1022
|
+
/** @description A list of allowed domains. */
|
|
1023
|
+
allowed_domains: string[];
|
|
1024
|
+
/** @description Optional domain-scoped secrets for allowlisted domains. */
|
|
1025
|
+
domain_secrets?: components["schemas"]["ContainerNetworkPolicyDomainSecretParam"][] | null;
|
|
1026
|
+
};
|
|
1027
|
+
/** @description A domain-scoped secret injected for allowlisted domains. */
|
|
1028
|
+
ContainerNetworkPolicyDomainSecretParam: {
|
|
1029
|
+
/** @description The domain associated with the secret. */
|
|
1030
|
+
domain: string;
|
|
1031
|
+
/** @description The name of the secret to inject for the domain. */
|
|
1032
|
+
name: string;
|
|
1033
|
+
/** @description The secret value to inject for the domain. */
|
|
1034
|
+
value: string;
|
|
1035
|
+
};
|
|
1036
|
+
/** @description References a container created with the /v1/containers endpoint. */
|
|
1037
|
+
ContainerReferenceParam: {
|
|
1038
|
+
/** @description The ID of the referenced container. */
|
|
1039
|
+
container_id: string;
|
|
1040
|
+
};
|
|
1041
|
+
/** @description A resource reference to a container by ID. */
|
|
1042
|
+
ContainerReferenceResource: {
|
|
1043
|
+
/** @description The ID of the referenced container. */
|
|
1044
|
+
container_id: string;
|
|
1045
|
+
};
|
|
1046
|
+
/** @description The conversation that this response belonged to. Input items and output items from this
|
|
1047
|
+
* response were automatically added to this conversation. */
|
|
1048
|
+
Conversation: {
|
|
1049
|
+
/** @description The unique ID of the conversation that this response was associated with. */
|
|
1050
|
+
id: string;
|
|
1051
|
+
};
|
|
1052
|
+
ConversationParam: string | components["schemas"]["Conversation"];
|
|
1053
|
+
/** @description An x/y coordinate pair. */
|
|
1054
|
+
CoordParam: {
|
|
1055
|
+
/**
|
|
1056
|
+
* Format: int32
|
|
1057
|
+
* @description The x-coordinate.
|
|
1058
|
+
*/
|
|
1059
|
+
x: number;
|
|
1060
|
+
/**
|
|
1061
|
+
* Format: int32
|
|
1062
|
+
* @description The y-coordinate.
|
|
1063
|
+
*/
|
|
1064
|
+
y: number;
|
|
1065
|
+
};
|
|
1066
|
+
CreateChatCompletionRequest: {
|
|
1067
|
+
/** @description A list of messages comprising the conversation so far. Depending on the
|
|
1068
|
+
* [model](https://platform.openai.com/docs/models) you use, different message types (modalities)
|
|
1069
|
+
* are supported, like [text](https://platform.openai.com/docs/guides/text-generation),
|
|
1070
|
+
* [images](https://platform.openai.com/docs/guides/vision), and
|
|
1071
|
+
* [audio](https://platform.openai.com/docs/guides/audio). */
|
|
1072
|
+
messages: components["schemas"]["ChatCompletionRequestMessage"][];
|
|
1073
|
+
/** @description Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
|
|
1074
|
+
* offers a wide range of models with different capabilities, performance
|
|
1075
|
+
* characteristics, and price points. Refer to the
|
|
1076
|
+
* [model guide](https://platform.openai.com/docs/models)
|
|
1077
|
+
* to browse and compare available models. */
|
|
1078
|
+
model: string;
|
|
1079
|
+
/** @description Output types that you would like the model to generate. Most models are capable of generating
|
|
1080
|
+
* text, which is the default:
|
|
1081
|
+
*
|
|
1082
|
+
* `["text"]`
|
|
1083
|
+
* The `gpt-4o-audio-preview` model can also be used to
|
|
1084
|
+
* [generate audio](https://platform.openai.com/docs/guides/audio). To request that this model
|
|
1085
|
+
* generate both text and audio responses, you can use:
|
|
1086
|
+
*
|
|
1087
|
+
* `["text", "audio"]` */
|
|
1088
|
+
modalities?: components["schemas"]["ResponseModalities"][] | null;
|
|
1089
|
+
verbosity?: null | components["schemas"]["Verbosity"];
|
|
1090
|
+
reasoning_effort?: null | components["schemas"]["ReasoningEffort"];
|
|
1091
|
+
/**
|
|
1092
|
+
* Format: int32
|
|
1093
|
+
* @description An upper bound for the number of tokens that can be generated for a completion, including
|
|
1094
|
+
* visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
1095
|
+
*/
|
|
1096
|
+
max_completion_tokens?: number | null;
|
|
1097
|
+
/**
|
|
1098
|
+
* Format: float
|
|
1099
|
+
* @description Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
1100
|
+
* their existing frequency in the text so far, decreasing the model's
|
|
1101
|
+
* likelihood to repeat the same line verbatim.
|
|
1102
|
+
*/
|
|
1103
|
+
frequency_penalty?: number | null;
|
|
1104
|
+
/**
|
|
1105
|
+
* Format: float
|
|
1106
|
+
* @description Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
1107
|
+
* whether they appear in the text so far, increasing the model's likelihood
|
|
1108
|
+
* to talk about new topics.
|
|
1109
|
+
*/
|
|
1110
|
+
presence_penalty?: number | null;
|
|
1111
|
+
web_search_options?: null | components["schemas"]["WebSearchOptions"];
|
|
1112
|
+
/**
|
|
1113
|
+
* Format: int32
|
|
1114
|
+
* @description An integer between 0 and 20 specifying the number of most likely tokens to
|
|
1115
|
+
* return at each token position, each with an associated log probability.
|
|
1116
|
+
* `logprobs` must be set to `true` if this parameter is used.
|
|
1117
|
+
*/
|
|
1118
|
+
top_logprobs?: number | null;
|
|
1119
|
+
response_format?: null | components["schemas"]["ResponseFormat"];
|
|
1120
|
+
audio?: null | components["schemas"]["ChatCompletionAudio"];
|
|
1121
|
+
/** @description Whether or not to store the output of this chat completion request for
|
|
1122
|
+
* use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or
|
|
1123
|
+
* [evals](https://platform.openai.com/docs/guides/evals) products.
|
|
1124
|
+
*
|
|
1125
|
+
* Supports text and image inputs. Note: image inputs over 8MB will be dropped. */
|
|
1126
|
+
store?: boolean | null;
|
|
1127
|
+
/** @description If set to true, the model response data will be streamed to the client
|
|
1128
|
+
* as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
1129
|
+
* See the [Streaming section below](https://platform.openai.com/docs/api-reference/chat/streaming)
|
|
1130
|
+
* for more information, along with the [streaming responses](https://platform.openai.com/docs/guides/streaming-responses)
|
|
1131
|
+
* guide for more information on how to handle the streaming events. */
|
|
1132
|
+
stream?: boolean | null;
|
|
1133
|
+
stop?: null | components["schemas"]["StopConfiguration"];
|
|
1134
|
+
/** @description Modify the likelihood of specified tokens appearing in the completion.
|
|
1135
|
+
*
|
|
1136
|
+
* Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.
|
|
1137
|
+
* Mathematically, the bias is added to the logits generated by the model prior to sampling.
|
|
1138
|
+
* The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;
|
|
1139
|
+
* values like -100 or 100 should result in a ban or exclusive selection of the relevant token. */
|
|
1140
|
+
logit_bias?: {
|
|
1141
|
+
[key: string]: number;
|
|
1142
|
+
} | null;
|
|
1143
|
+
/** @description Whether to return log probabilities of the output tokens or not. If true,
|
|
1144
|
+
* returns the log probabilities of each output token returned in the `content` of `message`. */
|
|
1145
|
+
logprobs?: boolean | null;
|
|
1146
|
+
/**
|
|
1147
|
+
* Format: int32
|
|
1148
|
+
* @deprecated
|
|
1149
|
+
* @description The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in
|
|
1150
|
+
* the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
|
|
1151
|
+
* This value is now deprecated in favor of `max_completion_tokens`, and is
|
|
1152
|
+
* not compatible with [o-series models](https://platform.openai.com/docs/guides/reasoning).
|
|
1153
|
+
*/
|
|
1154
|
+
max_tokens?: number | null;
|
|
1155
|
+
/**
|
|
1156
|
+
* Format: int32
|
|
1157
|
+
* @description How many chat completion choices to generate for each input message. Note that you will be
|
|
1158
|
+
* charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to
|
|
1159
|
+
* minimize costs.
|
|
1160
|
+
*/
|
|
1161
|
+
n?: number | null;
|
|
1162
|
+
prediction?: null | components["schemas"]["PredictionContent"];
|
|
1163
|
+
/**
|
|
1164
|
+
* Format: int64
|
|
1165
|
+
* @deprecated
|
|
1166
|
+
* @description This feature is in Beta.
|
|
1167
|
+
*
|
|
1168
|
+
* If specified, our system will make a best effort to sample deterministically, such that
|
|
1169
|
+
* repeated requests with the same `seed` and parameters should return the same result.
|
|
1170
|
+
*
|
|
1171
|
+
* Determinism is not guaranteed, and you should refer to the `system_fingerprint` response
|
|
1172
|
+
* parameter to monitor changes in the backend.
|
|
1173
|
+
*/
|
|
1174
|
+
seed?: number | null;
|
|
1175
|
+
stream_options?: null | components["schemas"]["ChatCompletionStreamOptions"];
|
|
1176
|
+
service_tier?: null | components["schemas"]["ServiceTier"];
|
|
1177
|
+
/**
|
|
1178
|
+
* Format: float
|
|
1179
|
+
* @description What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
|
|
1180
|
+
* while lower values like 0.2 will make it more focused and deterministic.
|
|
1181
|
+
*
|
|
1182
|
+
* We generally recommend altering this or `top_p` but not both.
|
|
1183
|
+
*/
|
|
1184
|
+
temperature?: number | null;
|
|
1185
|
+
/**
|
|
1186
|
+
* Format: float
|
|
1187
|
+
* @description An alternative to sampling with temperature, called nucleus sampling,
|
|
1188
|
+
* where the model considers the results of the tokens with top_p probability mass.
|
|
1189
|
+
* So 0.1 means only the tokens comprising the top 10% probability mass are considered.
|
|
1190
|
+
*
|
|
1191
|
+
* We generally recommend altering this or `temperature` but not both.
|
|
1192
|
+
*/
|
|
1193
|
+
top_p?: number | null;
|
|
1194
|
+
/** @description A list of tools the model may call. You can provide either
|
|
1195
|
+
* [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) or
|
|
1196
|
+
* [function tools](https://platform.openai.com/docs/guides/function-calling). */
|
|
1197
|
+
tools?: components["schemas"]["ChatCompletionTools"][] | null;
|
|
1198
|
+
tool_choice?: null | components["schemas"]["ChatCompletionToolChoiceOption"];
|
|
1199
|
+
/** @description Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
|
1200
|
+
* during tool use. */
|
|
1201
|
+
parallel_tool_calls?: boolean | null;
|
|
1202
|
+
/**
|
|
1203
|
+
* @deprecated
|
|
1204
|
+
* @description This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key`
|
|
1205
|
+
* instead to maintain caching optimizations.
|
|
1206
|
+
* A stable identifier for your end-users.
|
|
1207
|
+
* Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and
|
|
1208
|
+
* prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
1209
|
+
*/
|
|
1210
|
+
user?: string | null;
|
|
1211
|
+
/** @description A stable identifier used to help detect users of your application that may be violating OpenAI's
|
|
1212
|
+
* usage policies.
|
|
1213
|
+
*
|
|
1214
|
+
* The IDs should be a string that uniquely identifies each user. We recommend hashing their username
|
|
1215
|
+
* or email address, in order to avoid sending us any identifying information. [Learn
|
|
1216
|
+
* more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). */
|
|
1217
|
+
safety_identifier?: string | null;
|
|
1218
|
+
/** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
|
|
1219
|
+
* the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). */
|
|
1220
|
+
prompt_cache_key?: string | null;
|
|
1221
|
+
function_call?: null | components["schemas"]["ChatCompletionFunctionCall"];
|
|
1222
|
+
/**
|
|
1223
|
+
* @deprecated
|
|
1224
|
+
* @description Deprecated in favor of `tools`.
|
|
1225
|
+
*
|
|
1226
|
+
* A list of functions the model may generate JSON inputs for.
|
|
1227
|
+
*/
|
|
1228
|
+
functions?: components["schemas"]["ChatCompletionFunctions"][] | null;
|
|
1229
|
+
metadata?: null | components["schemas"]["Metadata"];
|
|
1230
|
+
};
|
|
1231
|
+
/** @description Represents a chat completion response returned by model, based on the provided input. */
|
|
1232
|
+
CreateChatCompletionResponse: {
|
|
1233
|
+
/** @description A unique identifier for the chat completion. */
|
|
1234
|
+
id: string;
|
|
1235
|
+
/** @description A list of chat completion choices. Can be more than one if `n` is greater than 1. */
|
|
1236
|
+
choices: components["schemas"]["ChatChoice"][];
|
|
1237
|
+
/**
|
|
1238
|
+
* Format: int32
|
|
1239
|
+
* @description The Unix timestamp (in seconds) of when the chat completion was created.
|
|
1240
|
+
*/
|
|
1241
|
+
created: number;
|
|
1242
|
+
/** @description The model used for the chat completion. */
|
|
1243
|
+
model: string;
|
|
1244
|
+
service_tier?: null | components["schemas"]["ServiceTier"];
|
|
1245
|
+
/**
|
|
1246
|
+
* @deprecated
|
|
1247
|
+
* @description This fingerprint represents the backend configuration that the model runs with.
|
|
1248
|
+
*
|
|
1249
|
+
* Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
|
|
1250
|
+
*/
|
|
1251
|
+
system_fingerprint?: string | null;
|
|
1252
|
+
/** @description The object type, which is always `chat.completion`. */
|
|
1253
|
+
object: string;
|
|
1254
|
+
usage?: null | components["schemas"]["CompletionUsage"];
|
|
1255
|
+
};
|
|
1256
|
+
/** @description Represents a streamed chunk of a chat completion response returned by the model, based on the provided input. [Learn more](https://platform.openai.com/docs/guides/streaming-responses). */
|
|
1257
|
+
CreateChatCompletionStreamResponse: {
|
|
1258
|
+
/** @description A unique identifier for the chat completion. Each chunk has the same ID. */
|
|
1259
|
+
id: string;
|
|
1260
|
+
/** @description A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the last chunk if you set `stream_options: {"include_usage": true}`. */
|
|
1261
|
+
choices: components["schemas"]["ChatChoiceStream"][];
|
|
1262
|
+
/**
|
|
1263
|
+
* Format: int32
|
|
1264
|
+
* @description The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
|
|
1265
|
+
*/
|
|
1266
|
+
created: number;
|
|
1267
|
+
/** @description The model to generate the completion. */
|
|
1268
|
+
model: string;
|
|
1269
|
+
service_tier?: null | components["schemas"]["ServiceTier"];
|
|
1270
|
+
/**
|
|
1271
|
+
* @deprecated
|
|
1272
|
+
* @description This fingerprint represents the backend configuration that the model runs with.
|
|
1273
|
+
* Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
|
|
1274
|
+
*/
|
|
1275
|
+
system_fingerprint?: string | null;
|
|
1276
|
+
/** @description The object type, which is always `chat.completion.chunk`. */
|
|
1277
|
+
object: string;
|
|
1278
|
+
usage?: null | components["schemas"]["CompletionUsage"];
|
|
1279
|
+
};
|
|
1280
|
+
CreateEmbeddingRequest: {
|
|
1281
|
+
/** @description ID of the model to use. You can use the [List models](https://platform.openai.com/docs/api-reference/models/list)
|
|
1282
|
+
* API to see all of your available models, or see our [Model overview](https://platform.openai.com/docs/models)
|
|
1283
|
+
* for descriptions of them. */
|
|
1284
|
+
model: string;
|
|
1285
|
+
/** @description Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single
|
|
1286
|
+
* request, pass an array of strings or array of token arrays. The input must not exceed the max
|
|
1287
|
+
* input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and
|
|
1288
|
+
* any array must be 2048 dimensions or less. [Example Python
|
|
1289
|
+
* code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
|
|
1290
|
+
* In addition to the per-input token limit, all embedding models enforce a maximum of 300,000
|
|
1291
|
+
* tokens summed across all inputs in a single request. */
|
|
1292
|
+
input: components["schemas"]["EmbeddingInput"];
|
|
1293
|
+
encoding_format?: null | components["schemas"]["EncodingFormat"];
|
|
1294
|
+
/** @description A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
|
|
1295
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids). */
|
|
1296
|
+
user?: string | null;
|
|
1297
|
+
/**
|
|
1298
|
+
* Format: int32
|
|
1299
|
+
* @description The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
|
|
1300
|
+
*/
|
|
1301
|
+
dimensions?: number | null;
|
|
1302
|
+
};
|
|
1303
|
+
CreateEmbeddingResponse: {
|
|
1304
|
+
object: string;
|
|
1305
|
+
/** @description The name of the model used to generate the embedding. */
|
|
1306
|
+
model: string;
|
|
1307
|
+
/** @description The list of embeddings generated by the model. */
|
|
1308
|
+
data: components["schemas"]["Embedding"][];
|
|
1309
|
+
/** @description The usage information for the request. */
|
|
1310
|
+
usage: components["schemas"]["EmbeddingUsage"];
|
|
1311
|
+
};
|
|
1312
|
+
/** @description Builder for a Responses API request. */
|
|
1313
|
+
CreateResponse: {
|
|
1314
|
+
/** @description Whether to run the model response in the background.
|
|
1315
|
+
* [Learn more](https://platform.openai.com/docs/guides/background). */
|
|
1316
|
+
background?: boolean | null;
|
|
1317
|
+
conversation?: null | components["schemas"]["ConversationParam"];
|
|
1318
|
+
/** @description Specify additional output data to include in the model response. Currently supported
|
|
1319
|
+
* values are:
|
|
1320
|
+
*
|
|
1321
|
+
* - `web_search_call.action.sources`: Include the sources of the web search tool call.
|
|
1322
|
+
*
|
|
1323
|
+
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution in code
|
|
1324
|
+
* interpreter tool call items.
|
|
1325
|
+
*
|
|
1326
|
+
* - `computer_call_output.output.image_url`: Include image urls from the computer call
|
|
1327
|
+
* output.
|
|
1328
|
+
*
|
|
1329
|
+
* - `file_search_call.results`: Include the search results of the file search tool call.
|
|
1330
|
+
*
|
|
1331
|
+
* - `message.input_image.image_url`: Include image urls from the input message.
|
|
1332
|
+
*
|
|
1333
|
+
* - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
1334
|
+
*
|
|
1335
|
+
* - `reasoning.encrypted_content`: Includes an encrypted version of reasoning tokens in
|
|
1336
|
+
* reasoning item outputs. This enables reasoning items to be used in multi-turn
|
|
1337
|
+
* conversations when using the Responses API statelessly (like when the `store` parameter is
|
|
1338
|
+
* set to `false`, or when an organization is enrolled in the zero data retention program). */
|
|
1339
|
+
include?: components["schemas"]["IncludeEnum"][] | null;
|
|
1340
|
+
/** @description Text, image, or file inputs to the model, used to generate a response.
|
|
1341
|
+
*
|
|
1342
|
+
* Learn more:
|
|
1343
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
1344
|
+
* - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
1345
|
+
* - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
1346
|
+
* - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
1347
|
+
* - [Function calling](https://platform.openai.com/docs/guides/function-calling) */
|
|
1348
|
+
input: components["schemas"]["InputParam"];
|
|
1349
|
+
/** @description A system (or developer) message inserted into the model's context.
|
|
1350
|
+
*
|
|
1351
|
+
* When using along with `previous_response_id`, the instructions from a previous
|
|
1352
|
+
* response will not be carried over to the next response. This makes it simple
|
|
1353
|
+
* to swap out system (or developer) messages in new responses. */
|
|
1354
|
+
instructions?: string | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* Format: int32
|
|
1357
|
+
* @description An upper bound for the number of tokens that can be generated for a response, including
|
|
1358
|
+
* visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
1359
|
+
*/
|
|
1360
|
+
max_output_tokens?: number | null;
|
|
1361
|
+
/**
|
|
1362
|
+
* Format: int32
|
|
1363
|
+
* @description The maximum number of total calls to built-in tools that can be processed in a response. This
|
|
1364
|
+
* maximum number applies across all built-in tool calls, not per individual tool. Any further
|
|
1365
|
+
* attempts to call a tool by the model will be ignored.
|
|
1366
|
+
*/
|
|
1367
|
+
max_tool_calls?: number | null;
|
|
1368
|
+
/** @description Set of 16 key-value pairs that can be attached to an object. This can be
|
|
1369
|
+
* useful for storing additional information about the object in a structured
|
|
1370
|
+
* format, and querying for objects via API or the dashboard.
|
|
1371
|
+
*
|
|
1372
|
+
* Keys are strings with a maximum length of 64 characters. Values are
|
|
1373
|
+
* strings with a maximum length of 512 characters. */
|
|
1374
|
+
metadata?: {
|
|
1375
|
+
[key: string]: string;
|
|
1376
|
+
} | null;
|
|
1377
|
+
/** @description Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI
|
|
1378
|
+
* offers a wide range of models with different capabilities, performance
|
|
1379
|
+
* characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models)
|
|
1380
|
+
* to browse and compare available models. */
|
|
1381
|
+
model?: string | null;
|
|
1382
|
+
/** @description Whether to allow the model to run tool calls in parallel. */
|
|
1383
|
+
parallel_tool_calls?: boolean | null;
|
|
1384
|
+
/** @description The unique ID of the previous response to the model. Use this to create multi-turn conversations.
|
|
1385
|
+
* Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
1386
|
+
* Cannot be used in conjunction with `conversation`. */
|
|
1387
|
+
previous_response_id?: string | null;
|
|
1388
|
+
prompt?: null | components["schemas"]["Prompt"];
|
|
1389
|
+
/** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
|
|
1390
|
+
* the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). */
|
|
1391
|
+
prompt_cache_key?: string | null;
|
|
1392
|
+
prompt_cache_retention?: null | components["schemas"]["PromptCacheRetention"];
|
|
1393
|
+
reasoning?: null | components["schemas"]["Reasoning"];
|
|
1394
|
+
/** @description A stable identifier used to help detect users of your application that may be violating OpenAI's
|
|
1395
|
+
* usage policies.
|
|
1396
|
+
*
|
|
1397
|
+
* The IDs should be a string that uniquely identifies each user. We recommend hashing their username
|
|
1398
|
+
* or email address, in order to avoid sending us any identifying information. [Learn
|
|
1399
|
+
* more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). */
|
|
1400
|
+
safety_identifier?: string | null;
|
|
1401
|
+
service_tier?: null | components["schemas"]["ServiceTier"];
|
|
1402
|
+
/** @description Whether to store the generated model response for later retrieval via API. */
|
|
1403
|
+
store?: boolean | null;
|
|
1404
|
+
/** @description If set to true, the model response data will be streamed to the client
|
|
1405
|
+
* as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
1406
|
+
* See the [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
|
|
1407
|
+
* for more information. */
|
|
1408
|
+
stream?: boolean | null;
|
|
1409
|
+
stream_options?: null | components["schemas"]["ResponseStreamOptions"];
|
|
1410
|
+
/**
|
|
1411
|
+
* Format: float
|
|
1412
|
+
* @description What sampling temperature to use, between 0 and 2. Higher values like 0.8
|
|
1413
|
+
* will make the output more random, while lower values like 0.2 will make it
|
|
1414
|
+
* more focused and deterministic. We generally recommend altering this or
|
|
1415
|
+
* `top_p` but not both.
|
|
1416
|
+
*/
|
|
1417
|
+
temperature?: number | null;
|
|
1418
|
+
text?: null | components["schemas"]["ResponseTextParam"];
|
|
1419
|
+
tool_choice?: null | components["schemas"]["ToolChoiceParam"];
|
|
1420
|
+
/** @description An array of tools the model may call while generating a response. You
|
|
1421
|
+
* can specify which tool to use by setting the `tool_choice` parameter.
|
|
1422
|
+
*
|
|
1423
|
+
* We support the following categories of tools:
|
|
1424
|
+
* - **Built-in tools**: Tools that are provided by OpenAI that extend the
|
|
1425
|
+
* model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
|
|
1426
|
+
* or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
|
|
1427
|
+
* [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
1428
|
+
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers
|
|
1429
|
+
* or predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
1430
|
+
* [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
1431
|
+
* - **Function calls (custom tools)**: Functions that are defined by you,
|
|
1432
|
+
* enabling the model to call your own code with strongly typed arguments
|
|
1433
|
+
* and outputs. Learn more about
|
|
1434
|
+
* [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
|
|
1435
|
+
* custom tools to call your own code. */
|
|
1436
|
+
tools?: components["schemas"]["Tool"][] | null;
|
|
1437
|
+
/**
|
|
1438
|
+
* Format: int32
|
|
1439
|
+
* @description An integer between 0 and 20 specifying the number of most likely tokens to return at each
|
|
1440
|
+
* token position, each with an associated log probability.
|
|
1441
|
+
*/
|
|
1442
|
+
top_logprobs?: number | null;
|
|
1443
|
+
/**
|
|
1444
|
+
* Format: float
|
|
1445
|
+
* @description An alternative to sampling with temperature, called nucleus sampling,
|
|
1446
|
+
* where the model considers the results of the tokens with top_p probability
|
|
1447
|
+
* mass. So 0.1 means only the tokens comprising the top 10% probability mass
|
|
1448
|
+
* are considered.
|
|
1449
|
+
*
|
|
1450
|
+
* We generally recommend altering this or `temperature` but not both.
|
|
1451
|
+
*/
|
|
1452
|
+
top_p?: number | null;
|
|
1453
|
+
truncation?: null | components["schemas"]["Truncation"];
|
|
1454
|
+
};
|
|
1455
|
+
CustomGrammarFormatParam: {
|
|
1456
|
+
/** @description The grammar definition. */
|
|
1457
|
+
definition: string;
|
|
1458
|
+
/** @description The syntax of the grammar definition. One of `lark` or `regex`. */
|
|
1459
|
+
syntax: components["schemas"]["GrammarSyntax"];
|
|
1460
|
+
};
|
|
1461
|
+
CustomName: {
|
|
1462
|
+
/** @description The name of the custom tool to call. */
|
|
1463
|
+
name: string;
|
|
1464
|
+
};
|
|
1465
|
+
CustomTool: {
|
|
1466
|
+
/** @description The name of the custom tool to call. */
|
|
1467
|
+
name: string;
|
|
1468
|
+
/** @description The input for the custom tool call generated by the model. */
|
|
1469
|
+
input: string;
|
|
1470
|
+
};
|
|
1471
|
+
CustomToolCall: {
|
|
1472
|
+
/** @description An identifier used to map this custom tool call to a tool call output. */
|
|
1473
|
+
call_id: string;
|
|
1474
|
+
/** @description The namespace of the custom tool being called. */
|
|
1475
|
+
namespace?: string | null;
|
|
1476
|
+
/** @description The input for the custom tool call generated by the model. */
|
|
1477
|
+
input: string;
|
|
1478
|
+
/** @description The name of the custom tool being called. */
|
|
1479
|
+
name: string;
|
|
1480
|
+
/** @description The unique ID of the custom tool call in the OpenAI platform. */
|
|
1481
|
+
id: string;
|
|
1482
|
+
};
|
|
1483
|
+
CustomToolCallOutput: {
|
|
1484
|
+
/** @description The call ID, used to map this custom tool call output to a custom tool call. */
|
|
1485
|
+
call_id: string;
|
|
1486
|
+
/** @description The output from the custom tool call generated by your code.
|
|
1487
|
+
* Can be a string or an list of output content. */
|
|
1488
|
+
output: components["schemas"]["CustomToolCallOutputOutput"];
|
|
1489
|
+
/** @description The unique ID of the custom tool call output in the OpenAI platform. */
|
|
1490
|
+
id?: string | null;
|
|
1491
|
+
};
|
|
1492
|
+
CustomToolCallOutputOutput: string | components["schemas"]["InputContent"][];
|
|
1493
|
+
CustomToolChatCompletions: {
|
|
1494
|
+
custom: components["schemas"]["CustomToolProperties"];
|
|
1495
|
+
};
|
|
1496
|
+
CustomToolParam: {
|
|
1497
|
+
/** @description The name of the custom tool, used to identify it in tool calls. */
|
|
1498
|
+
name: string;
|
|
1499
|
+
/** @description Optional description of the custom tool, used to provide more context. */
|
|
1500
|
+
description?: string | null;
|
|
1501
|
+
/** @description The input format for the custom tool. Default is unconstrained text. */
|
|
1502
|
+
format: components["schemas"]["CustomToolParamFormat"];
|
|
1503
|
+
/** @description Whether this tool should be deferred and discovered via tool search. */
|
|
1504
|
+
defer_loading?: boolean | null;
|
|
1505
|
+
};
|
|
1506
|
+
CustomToolParamFormat: {
|
|
1507
|
+
/** @enum {string} */
|
|
1508
|
+
type: "text";
|
|
1509
|
+
} | (components["schemas"]["CustomGrammarFormatParam"] & {
|
|
1510
|
+
/** @enum {string} */
|
|
1511
|
+
type: "grammar";
|
|
1512
|
+
});
|
|
1513
|
+
CustomToolProperties: {
|
|
1514
|
+
/** @description The name of the custom tool, used to identify it in tool calls. */
|
|
1515
|
+
name: string;
|
|
1516
|
+
/** @description Optional description of the custom tool, used to provide more context. */
|
|
1517
|
+
description?: string | null;
|
|
1518
|
+
/** @description The input format for the custom tool. Default is unconstrained text. */
|
|
1519
|
+
format: components["schemas"]["CustomToolPropertiesFormat"];
|
|
1520
|
+
};
|
|
1521
|
+
CustomToolPropertiesFormat: {
|
|
1522
|
+
/** @enum {string} */
|
|
1523
|
+
type: "text";
|
|
1524
|
+
} | {
|
|
1525
|
+
grammar: components["schemas"]["CustomGrammarFormatParam"];
|
|
1526
|
+
/** @enum {string} */
|
|
1527
|
+
type: "grammar";
|
|
1528
|
+
};
|
|
1529
|
+
DeleteResponse: {
|
|
1530
|
+
object: string;
|
|
1531
|
+
deleted: boolean;
|
|
1532
|
+
id: string;
|
|
1533
|
+
};
|
|
1534
|
+
/** @description A double click action. */
|
|
1535
|
+
DoubleClickAction: {
|
|
1536
|
+
/**
|
|
1537
|
+
* Format: int32
|
|
1538
|
+
* @description The x-coordinate where the double click occurred.
|
|
1539
|
+
*/
|
|
1540
|
+
x: number;
|
|
1541
|
+
/**
|
|
1542
|
+
* Format: int32
|
|
1543
|
+
* @description The y-coordinate where the double click occurred.
|
|
1544
|
+
*/
|
|
1545
|
+
y: number;
|
|
1546
|
+
};
|
|
1547
|
+
/** @description A drag action. */
|
|
1548
|
+
DragParam: {
|
|
1549
|
+
/** @description An array of coordinates representing the path of the drag action. */
|
|
1550
|
+
path: components["schemas"]["CoordParam"][];
|
|
1551
|
+
};
|
|
1552
|
+
Duration: string;
|
|
1553
|
+
/** @description Content for EasyInputMessage - can be a simple string or structured list. */
|
|
1554
|
+
EasyInputContent: string | components["schemas"]["InputContent"][];
|
|
1555
|
+
/** @description A simplified message input to the model (EasyInputMessage in the OpenAPI spec).
|
|
1556
|
+
*
|
|
1557
|
+
* This is the most user-friendly way to provide messages, supporting both simple
|
|
1558
|
+
* string content and structured content. Role can include `assistant` for providing
|
|
1559
|
+
* previous assistant responses. */
|
|
1560
|
+
EasyInputMessage: {
|
|
1561
|
+
/** @description The type of the message input. Defaults to `message` when omitted in JSON input. */
|
|
1562
|
+
type?: components["schemas"]["MessageType"];
|
|
1563
|
+
/** @description The role of the message input. One of `user`, `assistant`, `system`, or `developer`. */
|
|
1564
|
+
role: components["schemas"]["Role"];
|
|
1565
|
+
/** @description Text, image, or audio input to the model, used to generate a response.
|
|
1566
|
+
* Can also contain previous assistant responses. */
|
|
1567
|
+
content: components["schemas"]["EasyInputContent"];
|
|
1568
|
+
phase?: null | components["schemas"]["MessagePhase"];
|
|
1569
|
+
};
|
|
1570
|
+
/** @description Represents an embedding vector returned by embedding endpoint. */
|
|
1571
|
+
Embedding: {
|
|
1572
|
+
/**
|
|
1573
|
+
* Format: int32
|
|
1574
|
+
* @description The index of the embedding in the list of embeddings.
|
|
1575
|
+
*/
|
|
1576
|
+
index: number;
|
|
1577
|
+
/** @description The object type, which is always "embedding". */
|
|
1578
|
+
object: string;
|
|
1579
|
+
/** @description The embedding vector, which is a list of floats. The length of vector
|
|
1580
|
+
* depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings). */
|
|
1581
|
+
embedding: number[];
|
|
1582
|
+
};
|
|
1583
|
+
EmbeddingInput: string | string[] | number[] | number[][];
|
|
1584
|
+
EmbeddingUsage: {
|
|
1585
|
+
/**
|
|
1586
|
+
* Format: int32
|
|
1587
|
+
* @description The number of tokens used by the prompt.
|
|
1588
|
+
*/
|
|
1589
|
+
prompt_tokens: number;
|
|
1590
|
+
/**
|
|
1591
|
+
* Format: int32
|
|
1592
|
+
* @description The total number of tokens used by the request.
|
|
1593
|
+
*/
|
|
1594
|
+
total_tokens: number;
|
|
1595
|
+
};
|
|
1596
|
+
/** @enum {string} */
|
|
1597
|
+
EncodingFormat: "float" | "base64";
|
|
1598
|
+
/** @description An error that occurred while generating the response. */
|
|
1599
|
+
ErrorObject: {
|
|
1600
|
+
/** @description A machine-readable error code that was returned. */
|
|
1601
|
+
code: string;
|
|
1602
|
+
/** @description A human-readable description of the error that was returned. */
|
|
1603
|
+
message: string;
|
|
1604
|
+
};
|
|
1605
|
+
FileCitationBody: {
|
|
1606
|
+
/** @description The ID of the file. */
|
|
1607
|
+
file_id: string;
|
|
1608
|
+
/** @description The filename of the file cited. */
|
|
1609
|
+
filename: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* Format: int32
|
|
1612
|
+
* @description The index of the file in the list of files.
|
|
1613
|
+
*/
|
|
1614
|
+
index: number;
|
|
1615
|
+
};
|
|
1616
|
+
FileObject: {
|
|
1617
|
+
/** @description The base64 encoded file data, used when passing the file to the model
|
|
1618
|
+
* as a string. */
|
|
1619
|
+
file_data?: string | null;
|
|
1620
|
+
/** @description The ID of an uploaded file to use as input. */
|
|
1621
|
+
file_id?: string | null;
|
|
1622
|
+
/** @description The name of the file, used when passing the file to the model as a
|
|
1623
|
+
* string. */
|
|
1624
|
+
filename?: string | null;
|
|
1625
|
+
};
|
|
1626
|
+
FilePath: {
|
|
1627
|
+
/** @description The ID of the file. */
|
|
1628
|
+
file_id: string;
|
|
1629
|
+
/**
|
|
1630
|
+
* Format: int32
|
|
1631
|
+
* @description The index of the file in the list of files.
|
|
1632
|
+
*/
|
|
1633
|
+
index: number;
|
|
1634
|
+
};
|
|
1635
|
+
FileSearchTool: {
|
|
1636
|
+
/** @description The IDs of the vector stores to search. */
|
|
1637
|
+
vector_store_ids: string[];
|
|
1638
|
+
/**
|
|
1639
|
+
* Format: int32
|
|
1640
|
+
* @description The maximum number of results to return. This number should be between 1 and 50 inclusive.
|
|
1641
|
+
*/
|
|
1642
|
+
max_num_results?: number | null;
|
|
1643
|
+
filters?: null | components["schemas"]["Filter"];
|
|
1644
|
+
ranking_options?: null | components["schemas"]["RankingOptions"];
|
|
1645
|
+
};
|
|
1646
|
+
/** @description File search tool call output. */
|
|
1647
|
+
FileSearchToolCall: {
|
|
1648
|
+
/** @description The unique ID of the file search tool call. */
|
|
1649
|
+
id: string;
|
|
1650
|
+
/** @description The queries used to search for files. */
|
|
1651
|
+
queries: string[];
|
|
1652
|
+
/** @description The status of the file search tool call. One of `in_progress`, `searching`,
|
|
1653
|
+
* `incomplete`,`failed`, or `completed`. */
|
|
1654
|
+
status: components["schemas"]["FileSearchToolCallStatus"];
|
|
1655
|
+
/** @description The results of the file search tool call. */
|
|
1656
|
+
results?: components["schemas"]["FileSearchToolCallResult"][] | null;
|
|
1657
|
+
};
|
|
1658
|
+
/** @description A single result from a file search. */
|
|
1659
|
+
FileSearchToolCallResult: {
|
|
1660
|
+
/** @description Set of 16 key-value pairs that can be attached to an object. This can be useful for storing
|
|
1661
|
+
* additional information about the object in a structured format, and querying for objects
|
|
1662
|
+
* API or the dashboard. Keys are strings with a maximum length of 64 characters
|
|
1663
|
+
* . Values are strings with a maximum length of 512 characters, booleans, or numbers. */
|
|
1664
|
+
attributes: Record<string, never>;
|
|
1665
|
+
/** @description The unique ID of the file. */
|
|
1666
|
+
file_id: string;
|
|
1667
|
+
/** @description The name of the file. */
|
|
1668
|
+
filename: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* Format: float
|
|
1671
|
+
* @description The relevance score of the file - a value between 0 and 1.
|
|
1672
|
+
*/
|
|
1673
|
+
score: number;
|
|
1674
|
+
/** @description The text that was retrieved from the file. */
|
|
1675
|
+
text: string;
|
|
1676
|
+
};
|
|
1677
|
+
/** @enum {string} */
|
|
1678
|
+
FileSearchToolCallStatus: "in_progress" | "searching" | "incomplete" | "failed" | "completed";
|
|
1679
|
+
/** @description Filters for file search. */
|
|
1680
|
+
Filter: components["schemas"]["ComparisonFilter"] | components["schemas"]["CompoundFilter"];
|
|
1681
|
+
/** @enum {string} */
|
|
1682
|
+
FinishReason: "stop" | "length" | "tool_calls" | "content_filter" | "function_call";
|
|
1683
|
+
/** @description The name and arguments of a function that should be called, as generated by the model. */
|
|
1684
|
+
FunctionCall: {
|
|
1685
|
+
/** @description The name of the function to call. */
|
|
1686
|
+
name: string;
|
|
1687
|
+
/** @description The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. */
|
|
1688
|
+
arguments: string;
|
|
1689
|
+
};
|
|
1690
|
+
FunctionCallOutput: string | components["schemas"]["InputContent"][];
|
|
1691
|
+
/** @description Output from a function call that you're providing back to the model. */
|
|
1692
|
+
FunctionCallOutputItemParam: {
|
|
1693
|
+
/** @description The unique ID of the function tool call generated by the model. */
|
|
1694
|
+
call_id: string;
|
|
1695
|
+
/** @description Text, image, or file output of the function tool call. */
|
|
1696
|
+
output: components["schemas"]["FunctionCallOutput"];
|
|
1697
|
+
/** @description The unique ID of the function tool call output.
|
|
1698
|
+
* Populated when this item is returned via API. */
|
|
1699
|
+
id?: string | null;
|
|
1700
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
1701
|
+
};
|
|
1702
|
+
/**
|
|
1703
|
+
* @description The status of a function call output.
|
|
1704
|
+
* @enum {string}
|
|
1705
|
+
*/
|
|
1706
|
+
FunctionCallOutputStatusEnum: "in_progress" | "completed" | "incomplete";
|
|
1707
|
+
/**
|
|
1708
|
+
* @description The status of a function call.
|
|
1709
|
+
* @enum {string}
|
|
1710
|
+
*/
|
|
1711
|
+
FunctionCallStatus: "in_progress" | "completed" | "incomplete";
|
|
1712
|
+
FunctionCallStream: {
|
|
1713
|
+
/** @description The name of the function to call. */
|
|
1714
|
+
name?: string | null;
|
|
1715
|
+
/** @description The arguments to call the function with, as generated by the model in JSON format.
|
|
1716
|
+
* Note that the model does not always generate valid JSON, and may hallucinate
|
|
1717
|
+
* parameters not defined by your function schema. Validate the arguments in your
|
|
1718
|
+
* code before calling your function. */
|
|
1719
|
+
arguments?: string | null;
|
|
1720
|
+
};
|
|
1721
|
+
FunctionName: {
|
|
1722
|
+
/** @description The name of the function to call. */
|
|
1723
|
+
name: string;
|
|
1724
|
+
};
|
|
1725
|
+
FunctionObject: {
|
|
1726
|
+
/** @description The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */
|
|
1727
|
+
name: string;
|
|
1728
|
+
/** @description A description of what the function does, used by the model to choose when and how to call the function. */
|
|
1729
|
+
description?: string | null;
|
|
1730
|
+
/** @description The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
1731
|
+
*
|
|
1732
|
+
* Omitting `parameters` defines a function with an empty parameter list. */
|
|
1733
|
+
parameters?: Record<string, never> | null;
|
|
1734
|
+
/** @description Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling). */
|
|
1735
|
+
strict?: boolean | null;
|
|
1736
|
+
};
|
|
1737
|
+
/** @description Shell exec action
|
|
1738
|
+
* Execute a shell command. */
|
|
1739
|
+
FunctionShellAction: {
|
|
1740
|
+
/** @description A list of commands to run. */
|
|
1741
|
+
commands: string[];
|
|
1742
|
+
/**
|
|
1743
|
+
* Format: int64
|
|
1744
|
+
* @description Optional timeout in milliseconds for the commands.
|
|
1745
|
+
*/
|
|
1746
|
+
timeout_ms?: number | null;
|
|
1747
|
+
/**
|
|
1748
|
+
* Format: int64
|
|
1749
|
+
* @description Optional maximum number of characters to return from each command.
|
|
1750
|
+
*/
|
|
1751
|
+
max_output_length?: number | null;
|
|
1752
|
+
};
|
|
1753
|
+
/** @description Commands and limits describing how to run the shell tool call. */
|
|
1754
|
+
FunctionShellActionParam: {
|
|
1755
|
+
/** @description Ordered shell commands for the execution environment to run. */
|
|
1756
|
+
commands: string[];
|
|
1757
|
+
/**
|
|
1758
|
+
* Format: int64
|
|
1759
|
+
* @description Maximum wall-clock time in milliseconds to allow the shell commands to run.
|
|
1760
|
+
*/
|
|
1761
|
+
timeout_ms?: number | null;
|
|
1762
|
+
/**
|
|
1763
|
+
* Format: int64
|
|
1764
|
+
* @description Maximum number of UTF-8 characters to capture from combined stdout and stderr output.
|
|
1765
|
+
*/
|
|
1766
|
+
max_output_length?: number | null;
|
|
1767
|
+
};
|
|
1768
|
+
/** @description A tool call that executes one or more shell commands in a managed environment. */
|
|
1769
|
+
FunctionShellCall: {
|
|
1770
|
+
/** @description The unique ID of the function shell tool call. Populated when this item is returned via API. */
|
|
1771
|
+
id: string;
|
|
1772
|
+
/** @description The unique ID of the function shell tool call generated by the model. */
|
|
1773
|
+
call_id: string;
|
|
1774
|
+
/** @description The shell commands and limits that describe how to run the tool call. */
|
|
1775
|
+
action: components["schemas"]["FunctionShellAction"];
|
|
1776
|
+
/** @description The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. */
|
|
1777
|
+
status: components["schemas"]["LocalShellCallStatus"];
|
|
1778
|
+
environment?: null | components["schemas"]["FunctionShellCallEnvironment"];
|
|
1779
|
+
/** @description The ID of the entity that created this tool call. */
|
|
1780
|
+
created_by?: string | null;
|
|
1781
|
+
};
|
|
1782
|
+
/** @description The environment for a shell call (response side). */
|
|
1783
|
+
FunctionShellCallEnvironment: {
|
|
1784
|
+
/** @enum {string} */
|
|
1785
|
+
type: "local";
|
|
1786
|
+
} | (components["schemas"]["ContainerReferenceResource"] & {
|
|
1787
|
+
/** @enum {string} */
|
|
1788
|
+
type: "container_reference";
|
|
1789
|
+
});
|
|
1790
|
+
/** @description The environment for a shell call item (request side). */
|
|
1791
|
+
FunctionShellCallItemEnvironment: (components["schemas"]["LocalEnvironmentParam"] & {
|
|
1792
|
+
/** @enum {string} */
|
|
1793
|
+
type: "local";
|
|
1794
|
+
}) | (components["schemas"]["ContainerReferenceParam"] & {
|
|
1795
|
+
/** @enum {string} */
|
|
1796
|
+
type: "container_reference";
|
|
1797
|
+
});
|
|
1798
|
+
/** @description A tool representing a request to execute one or more shell commands. */
|
|
1799
|
+
FunctionShellCallItemParam: {
|
|
1800
|
+
/** @description The unique ID of the shell tool call. Populated when this item is returned via API. */
|
|
1801
|
+
id?: string | null;
|
|
1802
|
+
/** @description The unique ID of the shell tool call generated by the model. */
|
|
1803
|
+
call_id: string;
|
|
1804
|
+
/** @description The shell commands and limits that describe how to run the tool call. */
|
|
1805
|
+
action: components["schemas"]["FunctionShellActionParam"];
|
|
1806
|
+
status?: null | components["schemas"]["FunctionShellCallItemStatus"];
|
|
1807
|
+
environment?: null | components["schemas"]["FunctionShellCallItemEnvironment"];
|
|
1808
|
+
};
|
|
1809
|
+
/**
|
|
1810
|
+
* @description Status values reported for shell tool calls.
|
|
1811
|
+
* @enum {string}
|
|
1812
|
+
*/
|
|
1813
|
+
FunctionShellCallItemStatus: "in_progress" | "completed" | "incomplete";
|
|
1814
|
+
/** @description The output of a shell tool call that was emitted. */
|
|
1815
|
+
FunctionShellCallOutput: {
|
|
1816
|
+
/** @description The unique ID of the shell call output. Populated when this item is returned via API. */
|
|
1817
|
+
id: string;
|
|
1818
|
+
/** @description The unique ID of the shell tool call generated by the model. */
|
|
1819
|
+
call_id: string;
|
|
1820
|
+
/** @description An array of shell call output contents */
|
|
1821
|
+
output: components["schemas"]["FunctionShellCallOutputContent"][];
|
|
1822
|
+
/**
|
|
1823
|
+
* Format: int64
|
|
1824
|
+
* @description The maximum length of the shell command output. This is generated by the model and should be
|
|
1825
|
+
* passed back with the raw output.
|
|
1826
|
+
*/
|
|
1827
|
+
max_output_length?: number | null;
|
|
1828
|
+
/** @description The identifier of the actor that created the item. */
|
|
1829
|
+
created_by?: string | null;
|
|
1830
|
+
};
|
|
1831
|
+
/** @description The content of a shell tool call output that was emitted. */
|
|
1832
|
+
FunctionShellCallOutputContent: components["schemas"]["FunctionShellCallOutputOutcome"] & {
|
|
1833
|
+
/** @description The standard output that was captured. */
|
|
1834
|
+
stdout: string;
|
|
1835
|
+
/** @description The standard error output that was captured. */
|
|
1836
|
+
stderr: string;
|
|
1837
|
+
/** @description The identifier of the actor that created the item. */
|
|
1838
|
+
created_by?: string | null;
|
|
1839
|
+
};
|
|
1840
|
+
/** @description Captured stdout and stderr for a portion of a shell tool call output. */
|
|
1841
|
+
FunctionShellCallOutputContentParam: {
|
|
1842
|
+
/** @description Captured stdout output for this chunk of the shell call. */
|
|
1843
|
+
stdout: string;
|
|
1844
|
+
/** @description Captured stderr output for this chunk of the shell call. */
|
|
1845
|
+
stderr: string;
|
|
1846
|
+
/** @description The exit or timeout outcome associated with this chunk. */
|
|
1847
|
+
outcome: components["schemas"]["FunctionShellCallOutputOutcomeParam"];
|
|
1848
|
+
};
|
|
1849
|
+
/** @description Indicates that the shell commands finished and returned an exit code. */
|
|
1850
|
+
FunctionShellCallOutputExitOutcome: {
|
|
1851
|
+
/**
|
|
1852
|
+
* Format: int32
|
|
1853
|
+
* @description Exit code from the shell process.
|
|
1854
|
+
*/
|
|
1855
|
+
exit_code: number;
|
|
1856
|
+
};
|
|
1857
|
+
/** @description Indicates that the shell commands finished and returned an exit code. */
|
|
1858
|
+
FunctionShellCallOutputExitOutcomeParam: {
|
|
1859
|
+
/**
|
|
1860
|
+
* Format: int32
|
|
1861
|
+
* @description The exit code returned by the shell process.
|
|
1862
|
+
*/
|
|
1863
|
+
exit_code: number;
|
|
1864
|
+
};
|
|
1865
|
+
/** @description The streamed output items emitted by a shell tool call. */
|
|
1866
|
+
FunctionShellCallOutputItemParam: {
|
|
1867
|
+
/** @description The unique ID of the shell tool call output. Populated when this item is returned via API. */
|
|
1868
|
+
id?: string | null;
|
|
1869
|
+
/** @description The unique ID of the shell tool call generated by the model. */
|
|
1870
|
+
call_id: string;
|
|
1871
|
+
/** @description Captured chunks of stdout and stderr output, along with their associated outcomes. */
|
|
1872
|
+
output: components["schemas"]["FunctionShellCallOutputContentParam"][];
|
|
1873
|
+
/**
|
|
1874
|
+
* Format: int64
|
|
1875
|
+
* @description The maximum number of UTF-8 characters captured for this shell call's combined output.
|
|
1876
|
+
*/
|
|
1877
|
+
max_output_length?: number | null;
|
|
1878
|
+
};
|
|
1879
|
+
/** @description Function shell call outcome */
|
|
1880
|
+
FunctionShellCallOutputOutcome: {
|
|
1881
|
+
/** @enum {string} */
|
|
1882
|
+
type: "timeout";
|
|
1883
|
+
} | (components["schemas"]["FunctionShellCallOutputExitOutcome"] & {
|
|
1884
|
+
/** @enum {string} */
|
|
1885
|
+
type: "exit";
|
|
1886
|
+
});
|
|
1887
|
+
/** @description The exit or timeout outcome associated with this chunk. */
|
|
1888
|
+
FunctionShellCallOutputOutcomeParam: {
|
|
1889
|
+
/** @enum {string} */
|
|
1890
|
+
type: "timeout";
|
|
1891
|
+
} | (components["schemas"]["FunctionShellCallOutputExitOutcomeParam"] & {
|
|
1892
|
+
/** @enum {string} */
|
|
1893
|
+
type: "exit";
|
|
1894
|
+
});
|
|
1895
|
+
/** @description The execution environment for a shell tool — container or local. */
|
|
1896
|
+
FunctionShellEnvironment: (components["schemas"]["ContainerAutoParam"] & {
|
|
1897
|
+
/** @enum {string} */
|
|
1898
|
+
type: "container_auto";
|
|
1899
|
+
}) | (components["schemas"]["LocalEnvironmentParam"] & {
|
|
1900
|
+
/** @enum {string} */
|
|
1901
|
+
type: "local";
|
|
1902
|
+
}) | (components["schemas"]["ContainerReferenceParam"] & {
|
|
1903
|
+
/** @enum {string} */
|
|
1904
|
+
type: "container_reference";
|
|
1905
|
+
});
|
|
1906
|
+
/** @description Parameters for the shell function tool. */
|
|
1907
|
+
FunctionShellToolParam: {
|
|
1908
|
+
environment?: null | components["schemas"]["FunctionShellEnvironment"];
|
|
1909
|
+
};
|
|
1910
|
+
FunctionTool: {
|
|
1911
|
+
/** @description The name of the function to call. */
|
|
1912
|
+
name: string;
|
|
1913
|
+
/** @description A JSON schema object describing the parameters of the function. */
|
|
1914
|
+
parameters?: Record<string, never> | null;
|
|
1915
|
+
/** @description Whether to enforce strict parameter validation. Default `true`. */
|
|
1916
|
+
strict?: boolean | null;
|
|
1917
|
+
/** @description A description of the function. Used by the model to determine whether or not to call the
|
|
1918
|
+
* function. */
|
|
1919
|
+
description?: string | null;
|
|
1920
|
+
/** @description Whether this function is deferred and loaded via tool search. */
|
|
1921
|
+
defer_loading?: boolean | null;
|
|
1922
|
+
};
|
|
1923
|
+
FunctionToolCall: {
|
|
1924
|
+
/** @description A JSON string of the arguments to pass to the function. */
|
|
1925
|
+
arguments: string;
|
|
1926
|
+
/** @description The unique ID of the function tool call generated by the model. */
|
|
1927
|
+
call_id: string;
|
|
1928
|
+
/** @description The namespace of the function to run. */
|
|
1929
|
+
namespace?: string | null;
|
|
1930
|
+
/** @description The name of the function to run. */
|
|
1931
|
+
name: string;
|
|
1932
|
+
/** @description The unique ID of the function tool call. */
|
|
1933
|
+
id?: string | null;
|
|
1934
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
1935
|
+
};
|
|
1936
|
+
/** @description A function tool that can be used within a namespace or with tool search. */
|
|
1937
|
+
FunctionToolParam: {
|
|
1938
|
+
/** @description The name of the function. */
|
|
1939
|
+
name: string;
|
|
1940
|
+
/** @description A description of the function. */
|
|
1941
|
+
description?: string | null;
|
|
1942
|
+
/** @description A JSON schema object describing the parameters of the function. */
|
|
1943
|
+
parameters?: Record<string, never> | null;
|
|
1944
|
+
/** @description Whether to enforce strict parameter validation. */
|
|
1945
|
+
strict?: boolean | null;
|
|
1946
|
+
/** @description Whether this function should be deferred and discovered via tool search. */
|
|
1947
|
+
defer_loading?: boolean | null;
|
|
1948
|
+
};
|
|
1949
|
+
/** @enum {string} */
|
|
1950
|
+
FunctionType: "function";
|
|
1951
|
+
/** @enum {string} */
|
|
1952
|
+
GrammarSyntax: "lark" | "regex";
|
|
1953
|
+
HybridSearch: {
|
|
1954
|
+
/**
|
|
1955
|
+
* Format: float
|
|
1956
|
+
* @description The weight of the embedding in the reciprocal ranking fusion.
|
|
1957
|
+
*/
|
|
1958
|
+
embedding_weight: number;
|
|
1959
|
+
/**
|
|
1960
|
+
* Format: float
|
|
1961
|
+
* @description The weight of the text in the reciprocal ranking fusion.
|
|
1962
|
+
*/
|
|
1963
|
+
text_weight: number;
|
|
1964
|
+
};
|
|
1965
|
+
/** @enum {string} */
|
|
1966
|
+
ImageDetail: "auto" | "low" | "high" | "original";
|
|
1967
|
+
/**
|
|
1968
|
+
* @description Whether to generate a new image or edit an existing image.
|
|
1969
|
+
* @enum {string}
|
|
1970
|
+
*/
|
|
1971
|
+
ImageGenActionEnum: "generate" | "edit" | "auto";
|
|
1972
|
+
/** @description Image generation tool definition. */
|
|
1973
|
+
ImageGenTool: {
|
|
1974
|
+
background?: null | components["schemas"]["ImageGenToolBackground"];
|
|
1975
|
+
input_fidelity?: null | components["schemas"]["InputFidelity"];
|
|
1976
|
+
input_image_mask?: null | components["schemas"]["ImageGenToolInputImageMask"];
|
|
1977
|
+
/** @description The image generation model to use. Default: `gpt-image-1`. */
|
|
1978
|
+
model?: string | null;
|
|
1979
|
+
moderation?: null | components["schemas"]["ImageGenToolModeration"];
|
|
1980
|
+
/**
|
|
1981
|
+
* Format: int32
|
|
1982
|
+
* @description Compression level for the output image. Default: 100.
|
|
1983
|
+
*/
|
|
1984
|
+
output_compression?: number | null;
|
|
1985
|
+
output_format?: null | components["schemas"]["ImageGenToolOutputFormat"];
|
|
1986
|
+
/**
|
|
1987
|
+
* Format: int32
|
|
1988
|
+
* @description Number of partial images to generate in streaming mode, from 0 (default value) to 3.
|
|
1989
|
+
*/
|
|
1990
|
+
partial_images?: number | null;
|
|
1991
|
+
quality?: null | components["schemas"]["ImageGenToolQuality"];
|
|
1992
|
+
size?: null | components["schemas"]["ImageGenToolSize"];
|
|
1993
|
+
action?: null | components["schemas"]["ImageGenActionEnum"];
|
|
1994
|
+
};
|
|
1995
|
+
/** @enum {string} */
|
|
1996
|
+
ImageGenToolBackground: "transparent" | "opaque" | "auto";
|
|
1997
|
+
ImageGenToolCall: {
|
|
1998
|
+
/** @description The unique ID of the image generation call. */
|
|
1999
|
+
id: string;
|
|
2000
|
+
/** @description The generated image encoded in base64. */
|
|
2001
|
+
result?: string | null;
|
|
2002
|
+
/** @description The status of the image generation call. */
|
|
2003
|
+
status: components["schemas"]["ImageGenToolCallStatus"];
|
|
2004
|
+
};
|
|
2005
|
+
/** @enum {string} */
|
|
2006
|
+
ImageGenToolCallStatus: "in_progress" | "completed" | "generating" | "failed";
|
|
2007
|
+
ImageGenToolInputImageMask: {
|
|
2008
|
+
/** @description Base64-encoded mask image. */
|
|
2009
|
+
image_url?: string | null;
|
|
2010
|
+
/** @description File ID for the mask image. */
|
|
2011
|
+
file_id?: string | null;
|
|
2012
|
+
};
|
|
2013
|
+
/** @enum {string} */
|
|
2014
|
+
ImageGenToolModeration: "auto" | "low";
|
|
2015
|
+
/** @enum {string} */
|
|
2016
|
+
ImageGenToolOutputFormat: "png" | "webp" | "jpeg";
|
|
2017
|
+
/** @enum {string} */
|
|
2018
|
+
ImageGenToolQuality: "low" | "medium" | "high" | "auto";
|
|
2019
|
+
/** @enum {string} */
|
|
2020
|
+
ImageGenToolSize: "auto" | "1024x1024" | "1024x1536" | "1536x1024";
|
|
2021
|
+
ImageUrl: {
|
|
2022
|
+
/** @description Either a URL of the image or the base64 encoded image data. */
|
|
2023
|
+
url: string;
|
|
2024
|
+
detail?: null | components["schemas"]["ImageDetail"];
|
|
2025
|
+
};
|
|
2026
|
+
/** @enum {string} */
|
|
2027
|
+
IncludeEnum: "file_search_call.results" | "web_search_call.results" | "web_search_call.action.sources" | "message.input_image.image_url" | "computer_call_output.output.image_url" | "code_interpreter_call.outputs" | "reasoning.encrypted_content" | "message.output_text.logprobs";
|
|
2028
|
+
/** @description Details about an incomplete response. */
|
|
2029
|
+
IncompleteDetails: {
|
|
2030
|
+
/** @description The reason why the response is incomplete. */
|
|
2031
|
+
reason: string;
|
|
2032
|
+
};
|
|
2033
|
+
/** @description An inline skill definition. */
|
|
2034
|
+
InlineSkillParam: {
|
|
2035
|
+
/** @description The name of the skill. */
|
|
2036
|
+
name: string;
|
|
2037
|
+
/** @description The description of the skill. */
|
|
2038
|
+
description: string;
|
|
2039
|
+
/** @description The inline source for the skill. */
|
|
2040
|
+
source: components["schemas"]["InlineSkillSourceParam"];
|
|
2041
|
+
};
|
|
2042
|
+
/** @description An inline skill source (base64-encoded zip). */
|
|
2043
|
+
InlineSkillSourceParam: {
|
|
2044
|
+
/** @description The media type. Always `"application/zip"`. */
|
|
2045
|
+
media_type: string;
|
|
2046
|
+
/** @description The base64-encoded skill data. */
|
|
2047
|
+
data: string;
|
|
2048
|
+
};
|
|
2049
|
+
InputAudio: {
|
|
2050
|
+
/** @description Base64 encoded audio data. */
|
|
2051
|
+
data: string;
|
|
2052
|
+
/** @description The format of the encoded audio data. Currently supports "wav" and "mp3". */
|
|
2053
|
+
format: components["schemas"]["InputAudioFormat"];
|
|
2054
|
+
};
|
|
2055
|
+
/** @enum {string} */
|
|
2056
|
+
InputAudioFormat: "wav" | "mp3";
|
|
2057
|
+
/** @description Parts of a message: text, image, file, or audio. */
|
|
2058
|
+
InputContent: (components["schemas"]["InputTextContent"] & {
|
|
2059
|
+
/** @enum {string} */
|
|
2060
|
+
type: "input_text";
|
|
2061
|
+
}) | (components["schemas"]["InputImageContent"] & {
|
|
2062
|
+
/** @enum {string} */
|
|
2063
|
+
type: "input_image";
|
|
2064
|
+
}) | (components["schemas"]["InputFileContent"] & {
|
|
2065
|
+
/** @enum {string} */
|
|
2066
|
+
type: "input_file";
|
|
2067
|
+
});
|
|
2068
|
+
/** @enum {string} */
|
|
2069
|
+
InputFidelity: "high" | "low";
|
|
2070
|
+
InputFileContent: {
|
|
2071
|
+
/** @description The content of the file to be sent to the model. */
|
|
2072
|
+
file_data?: string | null;
|
|
2073
|
+
/** @description The ID of the file to be sent to the model. */
|
|
2074
|
+
file_id?: string | null;
|
|
2075
|
+
/** @description The URL of the file to be sent to the model. */
|
|
2076
|
+
file_url?: string | null;
|
|
2077
|
+
/** @description The name of the file to be sent to the model. */
|
|
2078
|
+
filename?: string | null;
|
|
2079
|
+
};
|
|
2080
|
+
InputImageContent: {
|
|
2081
|
+
/** @description The detail level of the image to be sent to the model. One of `high`, `low`, or `auto`.
|
|
2082
|
+
* Defaults to `auto`. */
|
|
2083
|
+
detail: components["schemas"]["ImageDetail"];
|
|
2084
|
+
/** @description The ID of the file to be sent to the model. */
|
|
2085
|
+
file_id?: string | null;
|
|
2086
|
+
/** @description The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image
|
|
2087
|
+
* in a data URL. */
|
|
2088
|
+
image_url?: string | null;
|
|
2089
|
+
};
|
|
2090
|
+
/** @description Input item that can be used in the context for generating a response.
|
|
2091
|
+
*
|
|
2092
|
+
* This represents the OpenAPI `InputItem` schema which is an `anyOf`:
|
|
2093
|
+
* 1. `EasyInputMessage` - Simple, user-friendly message input (can use string content)
|
|
2094
|
+
* 2. `Item` - Structured items with proper type discrimination (including InputMessage, OutputMessage, tool calls)
|
|
2095
|
+
* 3. `ItemReferenceParam` - Reference to an existing item by ID (type can be null)
|
|
2096
|
+
*
|
|
2097
|
+
* Uses untagged deserialization because these types overlap in structure.
|
|
2098
|
+
* Order matters: more specific structures are tried first.
|
|
2099
|
+
*
|
|
2100
|
+
* # OpenAPI Specification
|
|
2101
|
+
* Corresponds to the `InputItem` schema: `anyOf[EasyInputMessage, Item, ItemReferenceParam]` */
|
|
2102
|
+
InputItem: components["schemas"]["ItemReference"] | components["schemas"]["Item"] | components["schemas"]["EasyInputMessage"];
|
|
2103
|
+
/** @description A structured message input to the model (InputMessage in the OpenAPI spec).
|
|
2104
|
+
*
|
|
2105
|
+
* This variant requires structured content (not a simple string) and does not support
|
|
2106
|
+
* the `assistant` role (use OutputMessage for that). status is populated when items are returned via API. */
|
|
2107
|
+
InputMessage: {
|
|
2108
|
+
/** @description A list of one or many input items to the model, containing different content types. */
|
|
2109
|
+
content: components["schemas"]["InputContent"][];
|
|
2110
|
+
/** @description The role of the message input. One of `user`, `system`, or `developer`.
|
|
2111
|
+
* Note: `assistant` is NOT allowed here; use OutputMessage instead. */
|
|
2112
|
+
role: components["schemas"]["InputRole"];
|
|
2113
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
2114
|
+
};
|
|
2115
|
+
InputParam: string | components["schemas"]["InputItem"][];
|
|
2116
|
+
/**
|
|
2117
|
+
* @description The role for an input message - can only be `user`, `system`, or `developer`.
|
|
2118
|
+
* This type ensures type safety by excluding the `assistant` role (use OutputMessage for that).
|
|
2119
|
+
* @enum {string}
|
|
2120
|
+
*/
|
|
2121
|
+
InputRole: "user" | "system" | "developer";
|
|
2122
|
+
InputTextContent: {
|
|
2123
|
+
/** @description The text input to the model. */
|
|
2124
|
+
text: string;
|
|
2125
|
+
};
|
|
2126
|
+
InputTokenDetails: {
|
|
2127
|
+
/**
|
|
2128
|
+
* Format: int32
|
|
2129
|
+
* @description The number of tokens that were retrieved from the cache.
|
|
2130
|
+
* [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
|
|
2131
|
+
*/
|
|
2132
|
+
cached_tokens: number;
|
|
2133
|
+
};
|
|
2134
|
+
Instructions: string | components["schemas"]["InputItem"][];
|
|
2135
|
+
/** @description Content item used to generate a response.
|
|
2136
|
+
*
|
|
2137
|
+
* This is a properly discriminated union based on the `type` field, using Rust's
|
|
2138
|
+
* type-safe enum with serde's tag attribute for efficient deserialization.
|
|
2139
|
+
*
|
|
2140
|
+
* # OpenAPI Specification
|
|
2141
|
+
* Corresponds to the `Item` schema in the OpenAPI spec with a `type` discriminator. */
|
|
2142
|
+
Item: (components["schemas"]["MessageItem"] & {
|
|
2143
|
+
/** @enum {string} */
|
|
2144
|
+
type: "message";
|
|
2145
|
+
}) | (components["schemas"]["FileSearchToolCall"] & {
|
|
2146
|
+
/** @enum {string} */
|
|
2147
|
+
type: "file_search_call";
|
|
2148
|
+
}) | (components["schemas"]["ComputerToolCall"] & {
|
|
2149
|
+
/** @enum {string} */
|
|
2150
|
+
type: "computer_call";
|
|
2151
|
+
}) | (components["schemas"]["ComputerCallOutputItemParam"] & {
|
|
2152
|
+
/** @enum {string} */
|
|
2153
|
+
type: "computer_call_output";
|
|
2154
|
+
}) | (components["schemas"]["WebSearchToolCall"] & {
|
|
2155
|
+
/** @enum {string} */
|
|
2156
|
+
type: "web_search_call";
|
|
2157
|
+
}) | (components["schemas"]["FunctionToolCall"] & {
|
|
2158
|
+
/** @enum {string} */
|
|
2159
|
+
type: "function_call";
|
|
2160
|
+
}) | (components["schemas"]["FunctionCallOutputItemParam"] & {
|
|
2161
|
+
/** @enum {string} */
|
|
2162
|
+
type: "function_call_output";
|
|
2163
|
+
}) | (components["schemas"]["ToolSearchCallItemParam"] & {
|
|
2164
|
+
/** @enum {string} */
|
|
2165
|
+
type: "tool_search_call";
|
|
2166
|
+
}) | (components["schemas"]["ToolSearchOutputItemParam"] & {
|
|
2167
|
+
/** @enum {string} */
|
|
2168
|
+
type: "tool_search_output";
|
|
2169
|
+
}) | (components["schemas"]["ReasoningItem"] & {
|
|
2170
|
+
/** @enum {string} */
|
|
2171
|
+
type: "reasoning";
|
|
2172
|
+
}) | (components["schemas"]["CompactionSummaryItemParam"] & {
|
|
2173
|
+
/** @enum {string} */
|
|
2174
|
+
type: "compaction";
|
|
2175
|
+
}) | (components["schemas"]["ImageGenToolCall"] & {
|
|
2176
|
+
/** @enum {string} */
|
|
2177
|
+
type: "image_generation_call";
|
|
2178
|
+
}) | (components["schemas"]["CodeInterpreterToolCall"] & {
|
|
2179
|
+
/** @enum {string} */
|
|
2180
|
+
type: "code_interpreter_call";
|
|
2181
|
+
}) | (components["schemas"]["LocalShellToolCall"] & {
|
|
2182
|
+
/** @enum {string} */
|
|
2183
|
+
type: "local_shell_call";
|
|
2184
|
+
}) | (components["schemas"]["LocalShellToolCallOutput"] & {
|
|
2185
|
+
/** @enum {string} */
|
|
2186
|
+
type: "local_shell_call_output";
|
|
2187
|
+
}) | (components["schemas"]["FunctionShellCallItemParam"] & {
|
|
2188
|
+
/** @enum {string} */
|
|
2189
|
+
type: "shell_call";
|
|
2190
|
+
}) | (components["schemas"]["FunctionShellCallOutputItemParam"] & {
|
|
2191
|
+
/** @enum {string} */
|
|
2192
|
+
type: "shell_call_output";
|
|
2193
|
+
}) | (components["schemas"]["ApplyPatchToolCallItemParam"] & {
|
|
2194
|
+
/** @enum {string} */
|
|
2195
|
+
type: "apply_patch_call";
|
|
2196
|
+
}) | (components["schemas"]["ApplyPatchToolCallOutputItemParam"] & {
|
|
2197
|
+
/** @enum {string} */
|
|
2198
|
+
type: "apply_patch_call_output";
|
|
2199
|
+
}) | (components["schemas"]["MCPListTools"] & {
|
|
2200
|
+
/** @enum {string} */
|
|
2201
|
+
type: "mcp_list_tools";
|
|
2202
|
+
}) | (components["schemas"]["MCPApprovalRequest"] & {
|
|
2203
|
+
/** @enum {string} */
|
|
2204
|
+
type: "mcp_approval_request";
|
|
2205
|
+
}) | (components["schemas"]["MCPApprovalResponse"] & {
|
|
2206
|
+
/** @enum {string} */
|
|
2207
|
+
type: "mcp_approval_response";
|
|
2208
|
+
}) | (components["schemas"]["MCPToolCall"] & {
|
|
2209
|
+
/** @enum {string} */
|
|
2210
|
+
type: "mcp_call";
|
|
2211
|
+
}) | (components["schemas"]["CustomToolCallOutput"] & {
|
|
2212
|
+
/** @enum {string} */
|
|
2213
|
+
type: "custom_tool_call_output";
|
|
2214
|
+
}) | (components["schemas"]["CustomToolCall"] & {
|
|
2215
|
+
/** @enum {string} */
|
|
2216
|
+
type: "custom_tool_call";
|
|
2217
|
+
});
|
|
2218
|
+
/** @description A reference to an existing item by ID. */
|
|
2219
|
+
ItemReference: {
|
|
2220
|
+
type?: null | components["schemas"]["ItemReferenceType"];
|
|
2221
|
+
/** @description The ID of the item to reference. */
|
|
2222
|
+
id: string;
|
|
2223
|
+
};
|
|
2224
|
+
/** @enum {string} */
|
|
2225
|
+
ItemReferenceType: "item_reference";
|
|
2226
|
+
/** @description A keypress action. */
|
|
2227
|
+
KeyPressAction: {
|
|
2228
|
+
/** @description The combination of keys the model is requesting to be pressed.
|
|
2229
|
+
* This is an array of strings, each representing a key. */
|
|
2230
|
+
keys: string[];
|
|
2231
|
+
};
|
|
2232
|
+
ListModelResponse: {
|
|
2233
|
+
object: string;
|
|
2234
|
+
data: components["schemas"]["Model"][];
|
|
2235
|
+
};
|
|
2236
|
+
/** @description Uses a local computer environment. */
|
|
2237
|
+
LocalEnvironmentParam: {
|
|
2238
|
+
/** @description An optional list of local skills. */
|
|
2239
|
+
skills?: components["schemas"]["LocalSkillParam"][] | null;
|
|
2240
|
+
};
|
|
2241
|
+
/**
|
|
2242
|
+
* @description Status values reported for function shell tool calls.
|
|
2243
|
+
* @enum {string}
|
|
2244
|
+
*/
|
|
2245
|
+
LocalShellCallStatus: "in_progress" | "completed" | "incomplete";
|
|
2246
|
+
/** @description Define the shape of a local shell action (exec). */
|
|
2247
|
+
LocalShellExecAction: {
|
|
2248
|
+
/** @description The command to run. */
|
|
2249
|
+
command: string[];
|
|
2250
|
+
/** @description Environment variables to set for the command. */
|
|
2251
|
+
env: {
|
|
2252
|
+
[key: string]: string;
|
|
2253
|
+
};
|
|
2254
|
+
/**
|
|
2255
|
+
* Format: int64
|
|
2256
|
+
* @description Optional timeout in milliseconds for the command.
|
|
2257
|
+
*/
|
|
2258
|
+
timeout_ms?: number | null;
|
|
2259
|
+
/** @description Optional user to run the command as. */
|
|
2260
|
+
user?: string | null;
|
|
2261
|
+
/** @description Optional working directory to run the command in. */
|
|
2262
|
+
working_directory?: string | null;
|
|
2263
|
+
};
|
|
2264
|
+
LocalShellToolCall: {
|
|
2265
|
+
/** @description Execute a shell command on the server. */
|
|
2266
|
+
action: components["schemas"]["LocalShellExecAction"];
|
|
2267
|
+
/** @description The unique ID of the local shell tool call generated by the model. */
|
|
2268
|
+
call_id: string;
|
|
2269
|
+
/** @description The unique ID of the local shell call. */
|
|
2270
|
+
id: string;
|
|
2271
|
+
/** @description The status of the local shell call. */
|
|
2272
|
+
status: components["schemas"]["OutputStatus"];
|
|
2273
|
+
};
|
|
2274
|
+
/** @description Output from a local shell tool call that you're providing back to the model. */
|
|
2275
|
+
LocalShellToolCallOutput: {
|
|
2276
|
+
/** @description The unique ID of the local shell tool call generated by the model. */
|
|
2277
|
+
id: string;
|
|
2278
|
+
/** @description A JSON string of the output of the local shell tool call. */
|
|
2279
|
+
output: string;
|
|
2280
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
2281
|
+
};
|
|
2282
|
+
/** @description A local skill available in a local environment. */
|
|
2283
|
+
LocalSkillParam: {
|
|
2284
|
+
/** @description The name of the skill. */
|
|
2285
|
+
name: string;
|
|
2286
|
+
/** @description The description of the skill. */
|
|
2287
|
+
description: string;
|
|
2288
|
+
/** @description The path to the directory containing the skill. */
|
|
2289
|
+
path: string;
|
|
2290
|
+
};
|
|
2291
|
+
LogProb: {
|
|
2292
|
+
bytes: number[];
|
|
2293
|
+
/** Format: double */
|
|
2294
|
+
logprob: number;
|
|
2295
|
+
token: string;
|
|
2296
|
+
top_logprobs: components["schemas"]["TopLogProb"][];
|
|
2297
|
+
};
|
|
2298
|
+
MCPApprovalRequest: {
|
|
2299
|
+
/** @description JSON string of arguments for the tool. */
|
|
2300
|
+
arguments: string;
|
|
2301
|
+
/** @description The unique ID of the approval request. */
|
|
2302
|
+
id: string;
|
|
2303
|
+
/** @description The name of the tool to run. */
|
|
2304
|
+
name: string;
|
|
2305
|
+
/** @description The label of the MCP server making the request. */
|
|
2306
|
+
server_label: string;
|
|
2307
|
+
};
|
|
2308
|
+
/** @description An MCP approval response that you're providing back to the model. */
|
|
2309
|
+
MCPApprovalResponse: {
|
|
2310
|
+
/** @description The ID of the approval request being answered. */
|
|
2311
|
+
approval_request_id: string;
|
|
2312
|
+
/** @description Whether the request was approved. */
|
|
2313
|
+
approve: boolean;
|
|
2314
|
+
/** @description The unique ID of the approval response */
|
|
2315
|
+
id?: string | null;
|
|
2316
|
+
/** @description Optional reason for the decision. */
|
|
2317
|
+
reason?: string | null;
|
|
2318
|
+
};
|
|
2319
|
+
MCPListTools: {
|
|
2320
|
+
/** @description The unique ID of the list. */
|
|
2321
|
+
id: string;
|
|
2322
|
+
/** @description The label of the MCP server. */
|
|
2323
|
+
server_label: string;
|
|
2324
|
+
/** @description The tools available on the server. */
|
|
2325
|
+
tools: components["schemas"]["MCPListToolsTool"][];
|
|
2326
|
+
/** @description Error message if listing failed. */
|
|
2327
|
+
error?: string | null;
|
|
2328
|
+
};
|
|
2329
|
+
MCPListToolsTool: {
|
|
2330
|
+
/** @description The JSON schema describing the tool's input. */
|
|
2331
|
+
input_schema: Record<string, never>;
|
|
2332
|
+
/** @description The name of the tool. */
|
|
2333
|
+
name: string;
|
|
2334
|
+
/** @description Additional annotations about the tool. */
|
|
2335
|
+
annotations?: Record<string, never> | null;
|
|
2336
|
+
/** @description The description of the tool. */
|
|
2337
|
+
description?: string | null;
|
|
2338
|
+
};
|
|
2339
|
+
MCPTool: {
|
|
2340
|
+
/** @description A label for this MCP server, used to identify it in tool calls. */
|
|
2341
|
+
server_label: string;
|
|
2342
|
+
allowed_tools?: null | components["schemas"]["MCPToolAllowedTools"];
|
|
2343
|
+
/** @description An OAuth access token that can be used with a remote MCP server, either with a custom MCP
|
|
2344
|
+
* server URL or a service connector. Your application must handle the OAuth authorization
|
|
2345
|
+
* flow and provide the token here. */
|
|
2346
|
+
authorization?: string | null;
|
|
2347
|
+
connector_id?: null | components["schemas"]["McpToolConnectorId"];
|
|
2348
|
+
/** @description Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. */
|
|
2349
|
+
headers?: Record<string, never> | null;
|
|
2350
|
+
require_approval?: null | components["schemas"]["MCPToolRequireApproval"];
|
|
2351
|
+
/** @description Optional description of the MCP server, used to provide more context. */
|
|
2352
|
+
server_description?: string | null;
|
|
2353
|
+
/** @description The URL for the MCP server. One of `server_url` or `connector_id` must be provided. */
|
|
2354
|
+
server_url?: string | null;
|
|
2355
|
+
/** @description Whether this MCP tool is deferred and discovered via tool search. */
|
|
2356
|
+
defer_loading?: boolean | null;
|
|
2357
|
+
};
|
|
2358
|
+
MCPToolAllowedTools: string[] | components["schemas"]["MCPToolFilter"];
|
|
2359
|
+
MCPToolApprovalFilter: {
|
|
2360
|
+
always?: null | components["schemas"]["MCPToolFilter"];
|
|
2361
|
+
never?: null | components["schemas"]["MCPToolFilter"];
|
|
2362
|
+
};
|
|
2363
|
+
/** @enum {string} */
|
|
2364
|
+
MCPToolApprovalSetting: "always" | "never";
|
|
2365
|
+
/** @description Output of an MCP server tool invocation. */
|
|
2366
|
+
MCPToolCall: {
|
|
2367
|
+
/** @description A JSON string of the arguments passed to the tool. */
|
|
2368
|
+
arguments: string;
|
|
2369
|
+
/** @description The unique ID of the tool call. */
|
|
2370
|
+
id: string;
|
|
2371
|
+
/** @description The name of the tool that was run. */
|
|
2372
|
+
name: string;
|
|
2373
|
+
/** @description The label of the MCP server running the tool. */
|
|
2374
|
+
server_label: string;
|
|
2375
|
+
/** @description Unique identifier for the MCP tool call approval request. Include this value
|
|
2376
|
+
* in a subsequent `mcp_approval_response` input to approve or reject the corresponding
|
|
2377
|
+
* tool call. */
|
|
2378
|
+
approval_request_id?: string | null;
|
|
2379
|
+
/** @description Error message from the call, if any. */
|
|
2380
|
+
error?: string | null;
|
|
2381
|
+
/** @description The output from the tool call. */
|
|
2382
|
+
output?: string | null;
|
|
2383
|
+
status?: null | components["schemas"]["MCPToolCallStatus"];
|
|
2384
|
+
};
|
|
2385
|
+
/** @enum {string} */
|
|
2386
|
+
MCPToolCallStatus: "in_progress" | "completed" | "incomplete" | "calling" | "failed";
|
|
2387
|
+
MCPToolFilter: {
|
|
2388
|
+
/** @description Indicates whether or not a tool modifies data or is read-only.
|
|
2389
|
+
* If an MCP server is annotated with [readOnlyHint](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),
|
|
2390
|
+
* it will match this filter. */
|
|
2391
|
+
read_only?: boolean | null;
|
|
2392
|
+
/** @description List of allowed tool names. */
|
|
2393
|
+
tool_names?: string[] | null;
|
|
2394
|
+
};
|
|
2395
|
+
/** @description Approval policy or filter for MCP tools. */
|
|
2396
|
+
MCPToolRequireApproval: components["schemas"]["MCPToolApprovalFilter"] | components["schemas"]["MCPToolApprovalSetting"];
|
|
2397
|
+
/** @enum {string} */
|
|
2398
|
+
McpToolConnectorId: "connector_dropbox" | "connector_gmail" | "connector_googlecalendar" | "connector_googledrive" | "connector_microsoftteams" | "connector_outlookcalendar" | "connector_outlookemail" | "connector_sharepoint";
|
|
2399
|
+
Message: {
|
|
2400
|
+
role: string;
|
|
2401
|
+
content: string;
|
|
2402
|
+
images?: string[] | null;
|
|
2403
|
+
};
|
|
2404
|
+
/** @description A message item used within the `Item` enum.
|
|
2405
|
+
*
|
|
2406
|
+
* Both InputMessage and OutputMessage have `type: "message"`, so we use an untagged
|
|
2407
|
+
* enum to distinguish them based on their structure:
|
|
2408
|
+
* - OutputMessage: role=assistant, required id & status fields
|
|
2409
|
+
* - InputMessage: role=user/system/developer, content is `Vec<ContentType>`, optional id/status
|
|
2410
|
+
*
|
|
2411
|
+
* Note: EasyInputMessage is NOT included here - it's a separate variant in `InputItem`,
|
|
2412
|
+
* not part of the structured `Item` enum. */
|
|
2413
|
+
MessageItem: components["schemas"]["OutputMessage"] | components["schemas"]["InputMessage"];
|
|
2414
|
+
/**
|
|
2415
|
+
* @description Labels an `assistant` message as intermediate commentary or the final answer.
|
|
2416
|
+
* For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend
|
|
2417
|
+
* phase on all assistant messages — dropping it can degrade performance.
|
|
2418
|
+
* @enum {string}
|
|
2419
|
+
*/
|
|
2420
|
+
MessagePhase: "commentary" | "final_answer";
|
|
2421
|
+
/** @enum {string} */
|
|
2422
|
+
MessageType: "message";
|
|
2423
|
+
/** @description Set of 16 key-value pairs that can be attached to an object.
|
|
2424
|
+
* This can be useful for storing additional information about the
|
|
2425
|
+
* object in a structured format, and querying for objects via API
|
|
2426
|
+
* or the dashboard. Keys are strings with a maximum length of 64
|
|
2427
|
+
* characters. Values are strings with a maximum length of 512
|
|
2428
|
+
* characters. */
|
|
2429
|
+
Metadata: unknown;
|
|
2430
|
+
/** @description Describes an OpenAI model offering that can be used with the API. */
|
|
2431
|
+
Model: {
|
|
2432
|
+
/** @description The model identifier, which can be referenced in the API endpoints. */
|
|
2433
|
+
id: string;
|
|
2434
|
+
/** @description The object type, which is always "model". */
|
|
2435
|
+
object: string;
|
|
2436
|
+
/**
|
|
2437
|
+
* Format: int32
|
|
2438
|
+
* @description The Unix timestamp (in seconds) when the model was created.
|
|
2439
|
+
*/
|
|
2440
|
+
created: number;
|
|
2441
|
+
/** @description The organization that owns the model. */
|
|
2442
|
+
owned_by: string;
|
|
2443
|
+
};
|
|
2444
|
+
ModelDetails: {
|
|
2445
|
+
parent_model?: string | null;
|
|
2446
|
+
format: string;
|
|
2447
|
+
family: string;
|
|
2448
|
+
families?: string[] | null;
|
|
2449
|
+
parameter_size: string;
|
|
2450
|
+
quantization_level: string;
|
|
2451
|
+
};
|
|
2452
|
+
ModelsResponse: {
|
|
2453
|
+
models: components["schemas"]["OllamaModel"][];
|
|
2454
|
+
};
|
|
2455
|
+
/** @description A mouse move action. */
|
|
2456
|
+
MoveParam: {
|
|
2457
|
+
/**
|
|
2458
|
+
* Format: int32
|
|
2459
|
+
* @description The x-coordinate to move to.
|
|
2460
|
+
*/
|
|
2461
|
+
x: number;
|
|
2462
|
+
/**
|
|
2463
|
+
* Format: int32
|
|
2464
|
+
* @description The y-coordinate to move to.
|
|
2465
|
+
*/
|
|
2466
|
+
y: number;
|
|
2467
|
+
};
|
|
2468
|
+
/** @description Groups function/custom tools under a shared namespace. */
|
|
2469
|
+
NamespaceToolParam: {
|
|
2470
|
+
/** @description The namespace name used in tool calls (for example, `crm`). */
|
|
2471
|
+
name: string;
|
|
2472
|
+
/** @description A description of the namespace shown to the model. */
|
|
2473
|
+
description: string;
|
|
2474
|
+
/** @description The function/custom tools available inside this namespace. */
|
|
2475
|
+
tools: components["schemas"]["NamespaceToolParamTool"][];
|
|
2476
|
+
};
|
|
2477
|
+
/** @description A function or custom tool that belongs to a namespace. */
|
|
2478
|
+
NamespaceToolParamTool: (components["schemas"]["FunctionToolParam"] & {
|
|
2479
|
+
/** @enum {string} */
|
|
2480
|
+
type: "function";
|
|
2481
|
+
}) | (components["schemas"]["CustomToolParam"] & {
|
|
2482
|
+
/** @enum {string} */
|
|
2483
|
+
type: "custom";
|
|
2484
|
+
});
|
|
2485
|
+
OllamaError: {
|
|
2486
|
+
error: string;
|
|
2487
|
+
};
|
|
2488
|
+
OllamaModel: {
|
|
2489
|
+
model: string;
|
|
2490
|
+
/** Format: int32 */
|
|
2491
|
+
modified_at: number;
|
|
2492
|
+
/** Format: int64 */
|
|
2493
|
+
size: number;
|
|
2494
|
+
digest: string;
|
|
2495
|
+
details: components["schemas"]["ModelDetails"];
|
|
2496
|
+
};
|
|
2497
|
+
Options: {
|
|
2498
|
+
/** Format: int32 */
|
|
2499
|
+
num_keep?: number | null;
|
|
2500
|
+
/** Format: int64 */
|
|
2501
|
+
seed?: number | null;
|
|
2502
|
+
/** Format: int32 */
|
|
2503
|
+
num_predict?: number | null;
|
|
2504
|
+
/** Format: int32 */
|
|
2505
|
+
top_k?: number | null;
|
|
2506
|
+
/** Format: float */
|
|
2507
|
+
top_p?: number | null;
|
|
2508
|
+
/** Format: float */
|
|
2509
|
+
tfs_z?: number | null;
|
|
2510
|
+
/** Format: float */
|
|
2511
|
+
typical_p?: number | null;
|
|
2512
|
+
/** Format: int32 */
|
|
2513
|
+
repeat_last_n?: number | null;
|
|
2514
|
+
/** Format: float */
|
|
2515
|
+
temperature?: number | null;
|
|
2516
|
+
/** Format: float */
|
|
2517
|
+
repeat_penalty?: number | null;
|
|
2518
|
+
/** Format: float */
|
|
2519
|
+
presence_penalty?: number | null;
|
|
2520
|
+
/** Format: float */
|
|
2521
|
+
frequency_penalty?: number | null;
|
|
2522
|
+
/** Format: float */
|
|
2523
|
+
mirostat?: number | null;
|
|
2524
|
+
/** Format: float */
|
|
2525
|
+
mirostat_tau?: number | null;
|
|
2526
|
+
/** Format: float */
|
|
2527
|
+
mirostat_eta?: number | null;
|
|
2528
|
+
penalize_newline?: boolean | null;
|
|
2529
|
+
stop?: string[] | null;
|
|
2530
|
+
numa?: boolean | null;
|
|
2531
|
+
/** Format: int32 */
|
|
2532
|
+
num_ctx?: number | null;
|
|
2533
|
+
/** Format: int32 */
|
|
2534
|
+
num_batch?: number | null;
|
|
2535
|
+
/** Format: int32 */
|
|
2536
|
+
num_gpu?: number | null;
|
|
2537
|
+
/** Format: int32 */
|
|
2538
|
+
main_gpu?: number | null;
|
|
2539
|
+
low_vram?: boolean | null;
|
|
2540
|
+
f16_kv?: boolean | null;
|
|
2541
|
+
logits_all?: boolean | null;
|
|
2542
|
+
vocab_only?: boolean | null;
|
|
2543
|
+
use_mmap?: boolean | null;
|
|
2544
|
+
use_mlock?: boolean | null;
|
|
2545
|
+
/** Format: int32 */
|
|
2546
|
+
num_thread?: number | null;
|
|
2547
|
+
};
|
|
2548
|
+
/** @description Output item */
|
|
2549
|
+
OutputItem: (components["schemas"]["OutputMessage"] & {
|
|
2550
|
+
/** @enum {string} */
|
|
2551
|
+
type: "message";
|
|
2552
|
+
}) | (components["schemas"]["FileSearchToolCall"] & {
|
|
2553
|
+
/** @enum {string} */
|
|
2554
|
+
type: "file_search_call";
|
|
2555
|
+
}) | (components["schemas"]["FunctionToolCall"] & {
|
|
2556
|
+
/** @enum {string} */
|
|
2557
|
+
type: "function_call";
|
|
2558
|
+
}) | (components["schemas"]["WebSearchToolCall"] & {
|
|
2559
|
+
/** @enum {string} */
|
|
2560
|
+
type: "web_search_call";
|
|
2561
|
+
}) | (components["schemas"]["ComputerToolCall"] & {
|
|
2562
|
+
/** @enum {string} */
|
|
2563
|
+
type: "computer_call";
|
|
2564
|
+
}) | (components["schemas"]["ReasoningItem"] & {
|
|
2565
|
+
/** @enum {string} */
|
|
2566
|
+
type: "reasoning";
|
|
2567
|
+
}) | (components["schemas"]["CompactionBody"] & {
|
|
2568
|
+
/** @enum {string} */
|
|
2569
|
+
type: "compaction";
|
|
2570
|
+
}) | (components["schemas"]["ImageGenToolCall"] & {
|
|
2571
|
+
/** @enum {string} */
|
|
2572
|
+
type: "image_generation_call";
|
|
2573
|
+
}) | (components["schemas"]["CodeInterpreterToolCall"] & {
|
|
2574
|
+
/** @enum {string} */
|
|
2575
|
+
type: "code_interpreter_call";
|
|
2576
|
+
}) | (components["schemas"]["LocalShellToolCall"] & {
|
|
2577
|
+
/** @enum {string} */
|
|
2578
|
+
type: "local_shell_call";
|
|
2579
|
+
}) | (components["schemas"]["FunctionShellCall"] & {
|
|
2580
|
+
/** @enum {string} */
|
|
2581
|
+
type: "shell_call";
|
|
2582
|
+
}) | (components["schemas"]["FunctionShellCallOutput"] & {
|
|
2583
|
+
/** @enum {string} */
|
|
2584
|
+
type: "shell_call_output";
|
|
2585
|
+
}) | (components["schemas"]["ApplyPatchToolCall"] & {
|
|
2586
|
+
/** @enum {string} */
|
|
2587
|
+
type: "apply_patch_call";
|
|
2588
|
+
}) | (components["schemas"]["ApplyPatchToolCallOutput"] & {
|
|
2589
|
+
/** @enum {string} */
|
|
2590
|
+
type: "apply_patch_call_output";
|
|
2591
|
+
}) | (components["schemas"]["MCPToolCall"] & {
|
|
2592
|
+
/** @enum {string} */
|
|
2593
|
+
type: "mcp_call";
|
|
2594
|
+
}) | (components["schemas"]["MCPListTools"] & {
|
|
2595
|
+
/** @enum {string} */
|
|
2596
|
+
type: "mcp_list_tools";
|
|
2597
|
+
}) | (components["schemas"]["MCPApprovalRequest"] & {
|
|
2598
|
+
/** @enum {string} */
|
|
2599
|
+
type: "mcp_approval_request";
|
|
2600
|
+
}) | (components["schemas"]["CustomToolCall"] & {
|
|
2601
|
+
/** @enum {string} */
|
|
2602
|
+
type: "custom_tool_call";
|
|
2603
|
+
}) | (components["schemas"]["ToolSearchCall"] & {
|
|
2604
|
+
/** @enum {string} */
|
|
2605
|
+
type: "tool_search_call";
|
|
2606
|
+
}) | (components["schemas"]["ToolSearchOutput"] & {
|
|
2607
|
+
/** @enum {string} */
|
|
2608
|
+
type: "tool_search_output";
|
|
2609
|
+
});
|
|
2610
|
+
/** @description A message generated by the model. */
|
|
2611
|
+
OutputMessage: {
|
|
2612
|
+
/** @description The content of the output message. */
|
|
2613
|
+
content: components["schemas"]["OutputMessageContent"][];
|
|
2614
|
+
/** @description The unique ID of the output message. */
|
|
2615
|
+
id: string;
|
|
2616
|
+
/** @description The role of the output message. Always `assistant`. */
|
|
2617
|
+
role: components["schemas"]["AssistantRole"];
|
|
2618
|
+
phase?: null | components["schemas"]["MessagePhase"];
|
|
2619
|
+
/** @description The status of the message input. One of `in_progress`, `completed`, or
|
|
2620
|
+
* `incomplete`. Populated when input items are returned via API. */
|
|
2621
|
+
status: components["schemas"]["OutputStatus"];
|
|
2622
|
+
};
|
|
2623
|
+
OutputMessageContent: (components["schemas"]["OutputTextContent"] & {
|
|
2624
|
+
/** @enum {string} */
|
|
2625
|
+
type: "output_text";
|
|
2626
|
+
}) | (components["schemas"]["RefusalContent"] & {
|
|
2627
|
+
/** @enum {string} */
|
|
2628
|
+
type: "refusal";
|
|
2629
|
+
});
|
|
2630
|
+
/**
|
|
2631
|
+
* @description Status of input/output items.
|
|
2632
|
+
* @enum {string}
|
|
2633
|
+
*/
|
|
2634
|
+
OutputStatus: "in_progress" | "completed" | "incomplete";
|
|
2635
|
+
/** @description A simple text output from the model. */
|
|
2636
|
+
OutputTextContent: {
|
|
2637
|
+
/** @description The annotations of the text output. */
|
|
2638
|
+
annotations: components["schemas"]["Annotation"][];
|
|
2639
|
+
logprobs?: components["schemas"]["LogProb"][] | null;
|
|
2640
|
+
/** @description The text output from the model. */
|
|
2641
|
+
text: string;
|
|
2642
|
+
};
|
|
2643
|
+
OutputTokenDetails: {
|
|
2644
|
+
/**
|
|
2645
|
+
* Format: int32
|
|
2646
|
+
* @description The number of reasoning tokens.
|
|
2647
|
+
*/
|
|
2648
|
+
reasoning_tokens: number;
|
|
2649
|
+
};
|
|
2650
|
+
/** @description Static predicted output content, such as the content of a text file that is being regenerated. */
|
|
2651
|
+
PredictionContent: {
|
|
2652
|
+
/** @description The type of the predicted content you want to provide. This type is
|
|
2653
|
+
* currently always `content`. */
|
|
2654
|
+
content: components["schemas"]["PredictionContentContent"];
|
|
2655
|
+
/** @enum {string} */
|
|
2656
|
+
type: "content";
|
|
2657
|
+
};
|
|
2658
|
+
/** @description The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. */
|
|
2659
|
+
PredictionContentContent: string | components["schemas"]["ChatCompletionRequestMessageContentPartText"][];
|
|
2660
|
+
Prompt: {
|
|
2661
|
+
/** @description The unique identifier of the prompt template to use. */
|
|
2662
|
+
id: string;
|
|
2663
|
+
/** @description Optional version of the prompt template. */
|
|
2664
|
+
version?: string | null;
|
|
2665
|
+
variables?: null | components["schemas"]["ResponsePromptVariables"];
|
|
2666
|
+
};
|
|
2667
|
+
/**
|
|
2668
|
+
* @description The retention policy for the prompt cache.
|
|
2669
|
+
* @enum {string}
|
|
2670
|
+
*/
|
|
2671
|
+
PromptCacheRetention: "in_memory" | "24h";
|
|
2672
|
+
/** @description Breakdown of tokens used in a completion. */
|
|
2673
|
+
PromptTokensDetails: {
|
|
2674
|
+
/**
|
|
2675
|
+
* Format: int32
|
|
2676
|
+
* @description Audio input tokens present in the prompt.
|
|
2677
|
+
*/
|
|
2678
|
+
audio_tokens?: number | null;
|
|
2679
|
+
/**
|
|
2680
|
+
* Format: int32
|
|
2681
|
+
* @description Cached tokens present in the prompt.
|
|
2682
|
+
*/
|
|
2683
|
+
cached_tokens?: number | null;
|
|
2684
|
+
};
|
|
2685
|
+
/** @enum {string} */
|
|
2686
|
+
RankVersionType: "auto" | "default-2024-11-15";
|
|
2687
|
+
/** @description Options for search result ranking. */
|
|
2688
|
+
RankingOptions: {
|
|
2689
|
+
hybrid_search?: null | components["schemas"]["HybridSearch"];
|
|
2690
|
+
/** @description The ranker to use for the file search. */
|
|
2691
|
+
ranker: components["schemas"]["RankVersionType"];
|
|
2692
|
+
/**
|
|
2693
|
+
* Format: float
|
|
2694
|
+
* @description The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will
|
|
2695
|
+
* attempt to return only the most relevant results, but may return fewer results.
|
|
2696
|
+
*/
|
|
2697
|
+
score_threshold?: number | null;
|
|
2698
|
+
};
|
|
2699
|
+
/** @description o-series reasoning settings. */
|
|
2700
|
+
Reasoning: {
|
|
2701
|
+
effort?: null | components["schemas"]["ReasoningEffort"];
|
|
2702
|
+
summary?: null | components["schemas"]["ReasoningSummary"];
|
|
2703
|
+
};
|
|
2704
|
+
/** @enum {string} */
|
|
2705
|
+
ReasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
2706
|
+
/** @description A reasoning item representing the model's chain of thought, including summary paragraphs. */
|
|
2707
|
+
ReasoningItem: {
|
|
2708
|
+
/** @description Unique identifier of the reasoning content. */
|
|
2709
|
+
id: string;
|
|
2710
|
+
/** @description Reasoning summary content. */
|
|
2711
|
+
summary: components["schemas"]["SummaryPart"][];
|
|
2712
|
+
/** @description Reasoning text content. */
|
|
2713
|
+
content?: components["schemas"]["ReasoningTextContent"][] | null;
|
|
2714
|
+
/** @description The encrypted content of the reasoning item - populated when a response is generated with
|
|
2715
|
+
* `reasoning.encrypted_content` in the `include` parameter. */
|
|
2716
|
+
encrypted_content?: string | null;
|
|
2717
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
2718
|
+
};
|
|
2719
|
+
/** @enum {string} */
|
|
2720
|
+
ReasoningSummary: "auto" | "concise" | "detailed";
|
|
2721
|
+
ReasoningTextContent: {
|
|
2722
|
+
/** @description The reasoning text from the model. */
|
|
2723
|
+
text: string;
|
|
2724
|
+
};
|
|
2725
|
+
/** @description A refusal explanation from the model. */
|
|
2726
|
+
RefusalContent: {
|
|
2727
|
+
/** @description The refusal explanation from the model. */
|
|
2728
|
+
refusal: string;
|
|
2729
|
+
};
|
|
2730
|
+
/** @description The complete response returned by the Responses API. */
|
|
2731
|
+
Response: {
|
|
2732
|
+
/** @description Whether to run the model response in the background.
|
|
2733
|
+
* [Learn more](https://platform.openai.com/docs/guides/background). */
|
|
2734
|
+
background?: boolean | null;
|
|
2735
|
+
billing?: null | components["schemas"]["Billing"];
|
|
2736
|
+
conversation?: null | components["schemas"]["Conversation"];
|
|
2737
|
+
/**
|
|
2738
|
+
* Format: int64
|
|
2739
|
+
* @description Unix timestamp (in seconds) when this Response was created.
|
|
2740
|
+
*/
|
|
2741
|
+
created_at: number;
|
|
2742
|
+
/**
|
|
2743
|
+
* Format: int64
|
|
2744
|
+
* @description Unix timestamp (in seconds) of when this Response was completed.
|
|
2745
|
+
* Only present when the status is `completed`.
|
|
2746
|
+
*/
|
|
2747
|
+
completed_at?: number | null;
|
|
2748
|
+
error?: null | components["schemas"]["ErrorObject"];
|
|
2749
|
+
/** @description Unique identifier for this response. */
|
|
2750
|
+
id: string;
|
|
2751
|
+
incomplete_details?: null | components["schemas"]["IncompleteDetails"];
|
|
2752
|
+
instructions?: null | components["schemas"]["Instructions"];
|
|
2753
|
+
/**
|
|
2754
|
+
* Format: int32
|
|
2755
|
+
* @description An upper bound for the number of tokens that can be generated for a response,
|
|
2756
|
+
* including visible output tokens and
|
|
2757
|
+
* [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
2758
|
+
*/
|
|
2759
|
+
max_output_tokens?: number | null;
|
|
2760
|
+
/** @description Set of 16 key-value pairs that can be attached to an object. This can be
|
|
2761
|
+
* useful for storing additional information about the object in a structured
|
|
2762
|
+
* format, and querying for objects via API or the dashboard.
|
|
2763
|
+
*
|
|
2764
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings
|
|
2765
|
+
* with a maximum length of 512 characters. */
|
|
2766
|
+
metadata?: {
|
|
2767
|
+
[key: string]: string;
|
|
2768
|
+
} | null;
|
|
2769
|
+
/** @description Model ID used to generate the response, like gpt-4o or o3. OpenAI offers a
|
|
2770
|
+
* wide range of models with different capabilities, performance characteristics,
|
|
2771
|
+
* and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. */
|
|
2772
|
+
model: string;
|
|
2773
|
+
/** @description The object type of this resource - always set to `response`. */
|
|
2774
|
+
object: string;
|
|
2775
|
+
/** @description An array of content items generated by the model.
|
|
2776
|
+
*
|
|
2777
|
+
* - The length and order of items in the output array is dependent on the model's response.
|
|
2778
|
+
* - Rather than accessing the first item in the output array and assuming it's an assistant
|
|
2779
|
+
* message with the content generated by the model, you might consider using
|
|
2780
|
+
* the `output_text` property where supported in SDKs. */
|
|
2781
|
+
output: components["schemas"]["OutputItem"][];
|
|
2782
|
+
/** @description SDK-only convenience property that contains the aggregated text output from all
|
|
2783
|
+
* `output_text` items in the `output` array, if any are present.
|
|
2784
|
+
* Supported in the Python and JavaScript SDKs.
|
|
2785
|
+
* Whether to allow the model to run tool calls in parallel. */
|
|
2786
|
+
parallel_tool_calls?: boolean | null;
|
|
2787
|
+
/** @description The unique ID of the previous response to the model. Use this to create multi-turn conversations.
|
|
2788
|
+
* Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
2789
|
+
* Cannot be used in conjunction with `conversation`. */
|
|
2790
|
+
previous_response_id?: string | null;
|
|
2791
|
+
prompt?: null | components["schemas"]["Prompt"];
|
|
2792
|
+
/** @description Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces
|
|
2793
|
+
* the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). */
|
|
2794
|
+
prompt_cache_key?: string | null;
|
|
2795
|
+
prompt_cache_retention?: null | components["schemas"]["PromptCacheRetention"];
|
|
2796
|
+
reasoning?: null | components["schemas"]["Reasoning"];
|
|
2797
|
+
/** @description A stable identifier used to help detect users of your application that may be violating OpenAI's
|
|
2798
|
+
* usage policies.
|
|
2799
|
+
*
|
|
2800
|
+
* The IDs should be a string that uniquely identifies each user. We recommend hashing their username
|
|
2801
|
+
* or email address, in order to avoid sending us any identifying information. [Learn
|
|
2802
|
+
* more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). */
|
|
2803
|
+
safety_identifier?: string | null;
|
|
2804
|
+
service_tier?: null | components["schemas"]["ServiceTier"];
|
|
2805
|
+
/** @description The status of the response generation.
|
|
2806
|
+
* One of `completed`, `failed`, `in_progress`, `cancelled`, `queued`, or `incomplete`. */
|
|
2807
|
+
status: components["schemas"]["Status"];
|
|
2808
|
+
/**
|
|
2809
|
+
* Format: float
|
|
2810
|
+
* @description What sampling temperature was used, between 0 and 2. Higher values like 0.8 make
|
|
2811
|
+
* outputs more random, lower values like 0.2 make output more focused and deterministic.
|
|
2812
|
+
*
|
|
2813
|
+
* We generally recommend altering this or `top_p` but not both.
|
|
2814
|
+
*/
|
|
2815
|
+
temperature?: number | null;
|
|
2816
|
+
text?: null | components["schemas"]["ResponseTextParam"];
|
|
2817
|
+
tool_choice?: null | components["schemas"]["ToolChoiceParam"];
|
|
2818
|
+
/** @description An array of tools the model may call while generating a response. You
|
|
2819
|
+
* can specify which tool to use by setting the `tool_choice` parameter.
|
|
2820
|
+
*
|
|
2821
|
+
* We support the following categories of tools:
|
|
2822
|
+
* - **Built-in tools**: Tools that are provided by OpenAI that extend the
|
|
2823
|
+
* model's capabilities, like [web search](https://platform.openai.com/docs/guides/tools-web-search)
|
|
2824
|
+
* or [file search](https://platform.openai.com/docs/guides/tools-file-search). Learn more about
|
|
2825
|
+
* [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
2826
|
+
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers
|
|
2827
|
+
* or predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
2828
|
+
* [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
2829
|
+
* - **Function calls (custom tools)**: Functions that are defined by you,
|
|
2830
|
+
* enabling the model to call your own code with strongly typed arguments
|
|
2831
|
+
* and outputs. Learn more about
|
|
2832
|
+
* [function calling](https://platform.openai.com/docs/guides/function-calling). You can also use
|
|
2833
|
+
* custom tools to call your own code. */
|
|
2834
|
+
tools?: components["schemas"]["Tool"][] | null;
|
|
2835
|
+
/**
|
|
2836
|
+
* Format: int32
|
|
2837
|
+
* @description An integer between 0 and 20 specifying the number of most likely tokens to return at each
|
|
2838
|
+
* token position, each with an associated log probability.
|
|
2839
|
+
*/
|
|
2840
|
+
top_logprobs?: number | null;
|
|
2841
|
+
/**
|
|
2842
|
+
* Format: float
|
|
2843
|
+
* @description An alternative to sampling with temperature, called nucleus sampling,
|
|
2844
|
+
* where the model considers the results of the tokens with top_p probability
|
|
2845
|
+
* mass. So 0.1 means only the tokens comprising the top 10% probability mass
|
|
2846
|
+
* are considered.
|
|
2847
|
+
*
|
|
2848
|
+
* We generally recommend altering this or `temperature` but not both.
|
|
2849
|
+
*/
|
|
2850
|
+
top_p?: number | null;
|
|
2851
|
+
truncation?: null | components["schemas"]["Truncation"];
|
|
2852
|
+
usage?: null | components["schemas"]["ResponseUsage"];
|
|
2853
|
+
};
|
|
2854
|
+
ResponseFormat: {
|
|
2855
|
+
/** @enum {string} */
|
|
2856
|
+
type: "text";
|
|
2857
|
+
} | {
|
|
2858
|
+
/** @enum {string} */
|
|
2859
|
+
type: "json_object";
|
|
2860
|
+
} | {
|
|
2861
|
+
json_schema: components["schemas"]["ResponseFormatJsonSchema"];
|
|
2862
|
+
/** @enum {string} */
|
|
2863
|
+
type: "json_schema";
|
|
2864
|
+
};
|
|
2865
|
+
ResponseFormatJsonSchema: {
|
|
2866
|
+
/** @description A description of what the response format is for, used by the model to determine how to respond in the format. */
|
|
2867
|
+
description?: string | null;
|
|
2868
|
+
/** @description The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */
|
|
2869
|
+
name: string;
|
|
2870
|
+
/** @description The schema for the response format, described as a JSON Schema object.
|
|
2871
|
+
* Learn how to build JSON schemas [here](https://json-schema.org/). */
|
|
2872
|
+
schema?: Record<string, never> | null;
|
|
2873
|
+
/** @description Whether to enable strict schema adherence when generating the output.
|
|
2874
|
+
* If set to true, the model will always follow the exact schema defined
|
|
2875
|
+
* in the `schema` field. Only a subset of JSON Schema is supported when
|
|
2876
|
+
* `strict` is `true`. To learn more, read the [Structured Outputs
|
|
2877
|
+
* guide](https://platform.openai.com/docs/guides/structured-outputs). */
|
|
2878
|
+
strict?: boolean | null;
|
|
2879
|
+
};
|
|
2880
|
+
/**
|
|
2881
|
+
* @description Output types that you would like the model to generate for this request.
|
|
2882
|
+
*
|
|
2883
|
+
* Most models are capable of generating text, which is the default: `["text"]`
|
|
2884
|
+
*
|
|
2885
|
+
* The `gpt-4o-audio-preview` model can also be used to [generate
|
|
2886
|
+
* audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]`
|
|
2887
|
+
* @enum {string}
|
|
2888
|
+
*/
|
|
2889
|
+
ResponseModalities: "text" | "audio";
|
|
2890
|
+
ResponsePromptVariables: string | components["schemas"]["InputContent"] | Record<string, never>;
|
|
2891
|
+
ResponseStreamOptions: {
|
|
2892
|
+
/** @description When true, stream obfuscation will be enabled. Stream obfuscation adds
|
|
2893
|
+
* random characters to an `obfuscation` field on streaming delta events to
|
|
2894
|
+
* normalize payload sizes as a mitigation to certain side-channel attacks.
|
|
2895
|
+
* These obfuscation fields are included by default, but add a small amount
|
|
2896
|
+
* of overhead to the data stream. You can set `include_obfuscation` to
|
|
2897
|
+
* false to optimize for bandwidth if you trust the network links between
|
|
2898
|
+
* your application and the OpenAI API. */
|
|
2899
|
+
include_obfuscation?: boolean | null;
|
|
2900
|
+
};
|
|
2901
|
+
/** @description Configuration for text response format. */
|
|
2902
|
+
ResponseTextParam: {
|
|
2903
|
+
/** @description An object specifying the format that the model must output.
|
|
2904
|
+
*
|
|
2905
|
+
* Configuring `{ "type": "json_schema" }` enables Structured Outputs,
|
|
2906
|
+
* which ensures the model will match your supplied JSON schema. Learn more in the
|
|
2907
|
+
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
|
2908
|
+
*
|
|
2909
|
+
* The default format is `{ "type": "text" }` with no additional options.
|
|
2910
|
+
*
|
|
2911
|
+
* **Not recommended for gpt-4o and newer models:**
|
|
2912
|
+
*
|
|
2913
|
+
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
|
2914
|
+
* ensures the message the model generates is valid JSON. Using `json_schema`
|
|
2915
|
+
* is preferred for models that support it. */
|
|
2916
|
+
format: components["schemas"]["TextResponseFormatConfiguration"];
|
|
2917
|
+
verbosity?: null | components["schemas"]["Verbosity"];
|
|
2918
|
+
};
|
|
2919
|
+
/** @description Usage statistics for a response. */
|
|
2920
|
+
ResponseUsage: {
|
|
2921
|
+
/**
|
|
2922
|
+
* Format: int32
|
|
2923
|
+
* @description The number of input tokens.
|
|
2924
|
+
*/
|
|
2925
|
+
input_tokens: number;
|
|
2926
|
+
/** @description A detailed breakdown of the input tokens. */
|
|
2927
|
+
input_tokens_details: components["schemas"]["InputTokenDetails"];
|
|
2928
|
+
/**
|
|
2929
|
+
* Format: int32
|
|
2930
|
+
* @description The number of output tokens.
|
|
2931
|
+
*/
|
|
2932
|
+
output_tokens: number;
|
|
2933
|
+
/** @description A detailed breakdown of the output tokens. */
|
|
2934
|
+
output_tokens_details: components["schemas"]["OutputTokenDetails"];
|
|
2935
|
+
/**
|
|
2936
|
+
* Format: int32
|
|
2937
|
+
* @description The total number of tokens used.
|
|
2938
|
+
*/
|
|
2939
|
+
total_tokens: number;
|
|
2940
|
+
};
|
|
2941
|
+
/**
|
|
2942
|
+
* @description Role of messages in the API.
|
|
2943
|
+
* @enum {string}
|
|
2944
|
+
*/
|
|
2945
|
+
Role: "user" | "assistant" | "system" | "developer";
|
|
2946
|
+
/** @description A scroll action. */
|
|
2947
|
+
ScrollParam: {
|
|
2948
|
+
/**
|
|
2949
|
+
* Format: int32
|
|
2950
|
+
* @description The horizontal scroll distance.
|
|
2951
|
+
*/
|
|
2952
|
+
scroll_x: number;
|
|
2953
|
+
/**
|
|
2954
|
+
* Format: int32
|
|
2955
|
+
* @description The vertical scroll distance.
|
|
2956
|
+
*/
|
|
2957
|
+
scroll_y: number;
|
|
2958
|
+
/**
|
|
2959
|
+
* Format: int32
|
|
2960
|
+
* @description The x-coordinate where the scroll occurred.
|
|
2961
|
+
*/
|
|
2962
|
+
x: number;
|
|
2963
|
+
/**
|
|
2964
|
+
* Format: int32
|
|
2965
|
+
* @description The y-coordinate where the scroll occurred.
|
|
2966
|
+
*/
|
|
2967
|
+
y: number;
|
|
2968
|
+
};
|
|
2969
|
+
/**
|
|
2970
|
+
* @description The type of content to search for.
|
|
2971
|
+
* @enum {string}
|
|
2972
|
+
*/
|
|
2973
|
+
SearchContentType: "text" | "image";
|
|
2974
|
+
/** @enum {string} */
|
|
2975
|
+
ServiceTier: "auto" | "default" | "flex" | "scale" | "priority";
|
|
2976
|
+
ShowRequest: {
|
|
2977
|
+
name: string;
|
|
2978
|
+
};
|
|
2979
|
+
ShowResponse: {
|
|
2980
|
+
details: components["schemas"]["ModelDetails"];
|
|
2981
|
+
license: string;
|
|
2982
|
+
model_info: {
|
|
2983
|
+
[key: string]: unknown;
|
|
2984
|
+
};
|
|
2985
|
+
modelfile: string;
|
|
2986
|
+
/** Format: int32 */
|
|
2987
|
+
modified_at: number;
|
|
2988
|
+
parameters: string;
|
|
2989
|
+
template: string;
|
|
2990
|
+
};
|
|
2991
|
+
/** @description A skill parameter — either a reference or inline definition. */
|
|
2992
|
+
SkillParam: (components["schemas"]["SkillReferenceParam"] & {
|
|
2993
|
+
/** @enum {string} */
|
|
2994
|
+
type: "skill_reference";
|
|
2995
|
+
}) | (components["schemas"]["InlineSkillParam"] & {
|
|
2996
|
+
/** @enum {string} */
|
|
2997
|
+
type: "inline";
|
|
2998
|
+
});
|
|
2999
|
+
/** @description A skill referenced by ID. */
|
|
3000
|
+
SkillReferenceParam: {
|
|
3001
|
+
/** @description The ID of the skill to reference. */
|
|
3002
|
+
skill_id: string;
|
|
3003
|
+
/** @description An optional specific version to use. */
|
|
3004
|
+
version?: string | null;
|
|
3005
|
+
};
|
|
3006
|
+
/** @enum {string} */
|
|
3007
|
+
Status: "completed" | "failed" | "in_progress" | "cancelled" | "queued" | "incomplete";
|
|
3008
|
+
StopConfiguration: string | string[];
|
|
3009
|
+
SummaryPart: components["schemas"]["SummaryTextContent"] & {
|
|
3010
|
+
/** @enum {string} */
|
|
3011
|
+
type: "summary_text";
|
|
3012
|
+
};
|
|
3013
|
+
SummaryTextContent: {
|
|
3014
|
+
/** @description A summary of the reasoning output from the model so far. */
|
|
3015
|
+
text: string;
|
|
3016
|
+
};
|
|
3017
|
+
TextResponseFormatConfiguration: {
|
|
3018
|
+
/** @enum {string} */
|
|
3019
|
+
type: "text";
|
|
3020
|
+
} | {
|
|
3021
|
+
/** @enum {string} */
|
|
3022
|
+
type: "json_object";
|
|
3023
|
+
} | (components["schemas"]["ResponseFormatJsonSchema"] & {
|
|
3024
|
+
/** @enum {string} */
|
|
3025
|
+
type: "json_schema";
|
|
3026
|
+
});
|
|
3027
|
+
/** @description Definitions for model-callable tools. */
|
|
3028
|
+
Tool: (components["schemas"]["FunctionTool"] & {
|
|
3029
|
+
/** @enum {string} */
|
|
3030
|
+
type: "function";
|
|
3031
|
+
}) | (components["schemas"]["FileSearchTool"] & {
|
|
3032
|
+
/** @enum {string} */
|
|
3033
|
+
type: "file_search";
|
|
3034
|
+
}) | (components["schemas"]["ComputerUsePreviewTool"] & {
|
|
3035
|
+
/** @enum {string} */
|
|
3036
|
+
type: "computer_use_preview";
|
|
3037
|
+
}) | (components["schemas"]["WebSearchTool"] & {
|
|
3038
|
+
/** @enum {string} */
|
|
3039
|
+
type: "web_search";
|
|
3040
|
+
}) | (components["schemas"]["WebSearchTool"] & {
|
|
3041
|
+
/** @enum {string} */
|
|
3042
|
+
type: "web_search_2025_08_26";
|
|
3043
|
+
}) | (components["schemas"]["MCPTool"] & {
|
|
3044
|
+
/** @enum {string} */
|
|
3045
|
+
type: "mcp";
|
|
3046
|
+
}) | (components["schemas"]["CodeInterpreterTool"] & {
|
|
3047
|
+
/** @enum {string} */
|
|
3048
|
+
type: "code_interpreter";
|
|
3049
|
+
}) | (components["schemas"]["ImageGenTool"] & {
|
|
3050
|
+
/** @enum {string} */
|
|
3051
|
+
type: "image_generation";
|
|
3052
|
+
}) | {
|
|
3053
|
+
/** @enum {string} */
|
|
3054
|
+
type: "local_shell";
|
|
3055
|
+
} | (components["schemas"]["FunctionShellToolParam"] & {
|
|
3056
|
+
/** @enum {string} */
|
|
3057
|
+
type: "shell";
|
|
3058
|
+
}) | (components["schemas"]["CustomToolParam"] & {
|
|
3059
|
+
/** @enum {string} */
|
|
3060
|
+
type: "custom";
|
|
3061
|
+
}) | (components["schemas"]["ComputerTool"] & {
|
|
3062
|
+
/** @enum {string} */
|
|
3063
|
+
type: "computer";
|
|
3064
|
+
}) | (components["schemas"]["NamespaceToolParam"] & {
|
|
3065
|
+
/** @enum {string} */
|
|
3066
|
+
type: "namespace";
|
|
3067
|
+
}) | (components["schemas"]["ToolSearchToolParam"] & {
|
|
3068
|
+
/** @enum {string} */
|
|
3069
|
+
type: "tool_search";
|
|
3070
|
+
}) | (components["schemas"]["WebSearchTool"] & {
|
|
3071
|
+
/** @enum {string} */
|
|
3072
|
+
type: "web_search_preview";
|
|
3073
|
+
}) | (components["schemas"]["WebSearchTool"] & {
|
|
3074
|
+
/** @enum {string} */
|
|
3075
|
+
type: "web_search_preview_2025_03_11";
|
|
3076
|
+
}) | {
|
|
3077
|
+
/** @enum {string} */
|
|
3078
|
+
type: "apply_patch";
|
|
3079
|
+
};
|
|
3080
|
+
ToolChoiceAllowed: {
|
|
3081
|
+
/** @description Constrains the tools available to the model to a pre-defined set.
|
|
3082
|
+
*
|
|
3083
|
+
* `auto` allows the model to pick from among the allowed tools and generate a
|
|
3084
|
+
* message.
|
|
3085
|
+
*
|
|
3086
|
+
* `required` requires the model to call one or more of the allowed tools. */
|
|
3087
|
+
mode: components["schemas"]["ToolChoiceAllowedMode"];
|
|
3088
|
+
/** @description A list of tool definitions that the model should be allowed to call.
|
|
3089
|
+
*
|
|
3090
|
+
* For the Responses API, the list of tool definitions might look like:
|
|
3091
|
+
* ```json
|
|
3092
|
+
* [
|
|
3093
|
+
* { "type": "function", "name": "get_weather" },
|
|
3094
|
+
* { "type": "mcp", "server_label": "deepwiki" },
|
|
3095
|
+
* { "type": "image_generation" }
|
|
3096
|
+
* ]
|
|
3097
|
+
* ``` */
|
|
3098
|
+
tools: Record<string, never>[];
|
|
3099
|
+
};
|
|
3100
|
+
/** @enum {string} */
|
|
3101
|
+
ToolChoiceAllowedMode: "auto" | "required";
|
|
3102
|
+
ToolChoiceCustom: {
|
|
3103
|
+
/** @description The name of the custom tool to call. */
|
|
3104
|
+
name: string;
|
|
3105
|
+
};
|
|
3106
|
+
ToolChoiceFunction: {
|
|
3107
|
+
/** @description The name of the function to call. */
|
|
3108
|
+
name: string;
|
|
3109
|
+
};
|
|
3110
|
+
ToolChoiceMCP: {
|
|
3111
|
+
/** @description The name of the tool to call on the server. */
|
|
3112
|
+
name: string;
|
|
3113
|
+
/** @description The label of the MCP server to use. */
|
|
3114
|
+
server_label: string;
|
|
3115
|
+
};
|
|
3116
|
+
/** @enum {string} */
|
|
3117
|
+
ToolChoiceOptions: "none" | "auto" | "required";
|
|
3118
|
+
ToolChoiceParam: (components["schemas"]["ToolChoiceAllowed"] & {
|
|
3119
|
+
/** @enum {string} */
|
|
3120
|
+
type: "allowed_tools";
|
|
3121
|
+
}) | (components["schemas"]["ToolChoiceFunction"] & {
|
|
3122
|
+
/** @enum {string} */
|
|
3123
|
+
type: "function";
|
|
3124
|
+
}) | (components["schemas"]["ToolChoiceMCP"] & {
|
|
3125
|
+
/** @enum {string} */
|
|
3126
|
+
type: "mcp";
|
|
3127
|
+
}) | (components["schemas"]["ToolChoiceCustom"] & {
|
|
3128
|
+
/** @enum {string} */
|
|
3129
|
+
type: "custom";
|
|
3130
|
+
}) | {
|
|
3131
|
+
/** @enum {string} */
|
|
3132
|
+
type: "apply_patch";
|
|
3133
|
+
} | {
|
|
3134
|
+
/** @enum {string} */
|
|
3135
|
+
type: "shell";
|
|
3136
|
+
} | (components["schemas"]["ToolChoiceTypes"] & {
|
|
3137
|
+
/** @enum {string} */
|
|
3138
|
+
type: "hosted";
|
|
3139
|
+
}) | (components["schemas"]["ToolChoiceOptions"] & {
|
|
3140
|
+
/** @enum {string} */
|
|
3141
|
+
type: "mode";
|
|
3142
|
+
});
|
|
3143
|
+
/** @description The type of hosted tool the model should to use. Learn more about
|
|
3144
|
+
* [built-in tools](https://platform.openai.com/docs/guides/tools). */
|
|
3145
|
+
ToolChoiceTypes: {
|
|
3146
|
+
/** @enum {string} */
|
|
3147
|
+
type: "file_search";
|
|
3148
|
+
} | {
|
|
3149
|
+
/** @enum {string} */
|
|
3150
|
+
type: "web_search_preview";
|
|
3151
|
+
} | {
|
|
3152
|
+
/** @enum {string} */
|
|
3153
|
+
type: "computer";
|
|
3154
|
+
} | {
|
|
3155
|
+
/** @enum {string} */
|
|
3156
|
+
type: "computer_use_preview";
|
|
3157
|
+
} | {
|
|
3158
|
+
/** @enum {string} */
|
|
3159
|
+
type: "computer_use";
|
|
3160
|
+
} | {
|
|
3161
|
+
/** @enum {string} */
|
|
3162
|
+
type: "web_search_preview_2025_03_11";
|
|
3163
|
+
} | {
|
|
3164
|
+
/** @enum {string} */
|
|
3165
|
+
type: "code_interpreter";
|
|
3166
|
+
} | {
|
|
3167
|
+
/** @enum {string} */
|
|
3168
|
+
type: "image_generation";
|
|
3169
|
+
};
|
|
3170
|
+
/** @description A tool search call output item. */
|
|
3171
|
+
ToolSearchCall: {
|
|
3172
|
+
/** @description The unique ID of the tool search call item. */
|
|
3173
|
+
id: string;
|
|
3174
|
+
/** @description The unique ID of the tool search call generated by the model. */
|
|
3175
|
+
call_id?: string | null;
|
|
3176
|
+
/** @description Whether tool search was executed by the server or by the client. */
|
|
3177
|
+
execution: components["schemas"]["ToolSearchExecutionType"];
|
|
3178
|
+
/** @description Arguments used for the tool search call. */
|
|
3179
|
+
arguments: Record<string, never>;
|
|
3180
|
+
/** @description The status of the tool search call item. */
|
|
3181
|
+
status: components["schemas"]["FunctionCallStatus"];
|
|
3182
|
+
/** @description The identifier of the actor that created the item. */
|
|
3183
|
+
created_by?: string | null;
|
|
3184
|
+
};
|
|
3185
|
+
/** @description A tool search call input item. */
|
|
3186
|
+
ToolSearchCallItemParam: {
|
|
3187
|
+
/** @description The unique ID of this tool search call. */
|
|
3188
|
+
id?: string | null;
|
|
3189
|
+
/** @description The unique ID of the tool search call generated by the model. */
|
|
3190
|
+
call_id?: string | null;
|
|
3191
|
+
execution?: null | components["schemas"]["ToolSearchExecutionType"];
|
|
3192
|
+
/** @description The arguments supplied to the tool search call. */
|
|
3193
|
+
arguments?: Record<string, never>;
|
|
3194
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
3195
|
+
};
|
|
3196
|
+
/**
|
|
3197
|
+
* @description Whether tool search was executed by the server or by the client.
|
|
3198
|
+
* @enum {string}
|
|
3199
|
+
*/
|
|
3200
|
+
ToolSearchExecutionType: "server" | "client";
|
|
3201
|
+
/** @description A tool search output item. */
|
|
3202
|
+
ToolSearchOutput: {
|
|
3203
|
+
/** @description The unique ID of the tool search output item. */
|
|
3204
|
+
id: string;
|
|
3205
|
+
/** @description The unique ID of the tool search call generated by the model. */
|
|
3206
|
+
call_id?: string | null;
|
|
3207
|
+
/** @description Whether tool search was executed by the server or by the client. */
|
|
3208
|
+
execution: components["schemas"]["ToolSearchExecutionType"];
|
|
3209
|
+
/** @description The loaded tool definitions returned by tool search. */
|
|
3210
|
+
tools: components["schemas"]["Tool"][];
|
|
3211
|
+
/** @description The status of the tool search output item. */
|
|
3212
|
+
status: components["schemas"]["FunctionCallOutputStatusEnum"];
|
|
3213
|
+
/** @description The identifier of the actor that created the item. */
|
|
3214
|
+
created_by?: string | null;
|
|
3215
|
+
};
|
|
3216
|
+
/** @description A tool search output input item. */
|
|
3217
|
+
ToolSearchOutputItemParam: {
|
|
3218
|
+
/** @description The unique ID of this tool search output. */
|
|
3219
|
+
id?: string | null;
|
|
3220
|
+
/** @description The unique ID of the tool search call generated by the model. */
|
|
3221
|
+
call_id?: string | null;
|
|
3222
|
+
execution?: null | components["schemas"]["ToolSearchExecutionType"];
|
|
3223
|
+
/** @description The loaded tool definitions returned by the tool search output. */
|
|
3224
|
+
tools: components["schemas"]["Tool"][];
|
|
3225
|
+
status?: null | components["schemas"]["OutputStatus"];
|
|
3226
|
+
};
|
|
3227
|
+
/** @description Hosted or BYOT tool search configuration for deferred tools. */
|
|
3228
|
+
ToolSearchToolParam: {
|
|
3229
|
+
execution?: null | components["schemas"]["ToolSearchExecutionType"];
|
|
3230
|
+
/** @description Description shown to the model for a client-executed tool search tool. */
|
|
3231
|
+
description?: string | null;
|
|
3232
|
+
/** @description Parameter schema for a client-executed tool search tool. */
|
|
3233
|
+
parameters?: Record<string, never> | null;
|
|
3234
|
+
};
|
|
3235
|
+
TopLogProb: {
|
|
3236
|
+
bytes: number[];
|
|
3237
|
+
/** Format: double */
|
|
3238
|
+
logprob: number;
|
|
3239
|
+
token: string;
|
|
3240
|
+
};
|
|
3241
|
+
TopLogprobs: {
|
|
3242
|
+
/** @description The token. */
|
|
3243
|
+
token: string;
|
|
3244
|
+
/**
|
|
3245
|
+
* Format: float
|
|
3246
|
+
* @description The log probability of this token.
|
|
3247
|
+
*/
|
|
3248
|
+
logprob: number;
|
|
3249
|
+
/** @description A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. */
|
|
3250
|
+
bytes?: number[] | null;
|
|
3251
|
+
};
|
|
3252
|
+
/**
|
|
3253
|
+
* @description Truncation strategies.
|
|
3254
|
+
* @enum {string}
|
|
3255
|
+
*/
|
|
3256
|
+
Truncation: "auto" | "disabled";
|
|
3257
|
+
/** @description A typing (text entry) action. */
|
|
3258
|
+
TypeParam: {
|
|
3259
|
+
/** @description The text to type. */
|
|
3260
|
+
text: string;
|
|
3261
|
+
};
|
|
3262
|
+
UrlCitation: {
|
|
3263
|
+
/**
|
|
3264
|
+
* Format: int32
|
|
3265
|
+
* @description The index of the last character of the URL citation in the message.
|
|
3266
|
+
*/
|
|
3267
|
+
end_index: number;
|
|
3268
|
+
/**
|
|
3269
|
+
* Format: int32
|
|
3270
|
+
* @description The index of the first character of the URL citation in the message.
|
|
3271
|
+
*/
|
|
3272
|
+
start_index: number;
|
|
3273
|
+
/** @description The title of the web resource. */
|
|
3274
|
+
title: string;
|
|
3275
|
+
/** @description The URL of the web resource. */
|
|
3276
|
+
url: string;
|
|
3277
|
+
};
|
|
3278
|
+
UrlCitationBody: {
|
|
3279
|
+
/**
|
|
3280
|
+
* Format: int32
|
|
3281
|
+
* @description The index of the last character of the URL citation in the message.
|
|
3282
|
+
*/
|
|
3283
|
+
end_index: number;
|
|
3284
|
+
/**
|
|
3285
|
+
* Format: int32
|
|
3286
|
+
* @description The index of the first character of the URL citation in the message.
|
|
3287
|
+
*/
|
|
3288
|
+
start_index: number;
|
|
3289
|
+
/** @description The title of the web resource. */
|
|
3290
|
+
title: string;
|
|
3291
|
+
/** @description The URL of the web resource. */
|
|
3292
|
+
url: string;
|
|
3293
|
+
};
|
|
3294
|
+
/**
|
|
3295
|
+
* @description o-series reasoning settings.
|
|
3296
|
+
* @enum {string}
|
|
3297
|
+
*/
|
|
3298
|
+
Verbosity: "low" | "medium" | "high";
|
|
3299
|
+
WebSearchActionFind: {
|
|
3300
|
+
/** @description The URL of the page searched for the pattern. */
|
|
3301
|
+
url: string;
|
|
3302
|
+
/** @description The pattern or text to search for within the page. */
|
|
3303
|
+
pattern: string;
|
|
3304
|
+
};
|
|
3305
|
+
WebSearchActionOpenPage: {
|
|
3306
|
+
/** @description The URL opened by the model. */
|
|
3307
|
+
url?: string | null;
|
|
3308
|
+
};
|
|
3309
|
+
WebSearchActionSearch: {
|
|
3310
|
+
/** @description The search query. */
|
|
3311
|
+
query: string;
|
|
3312
|
+
/** @description The sources used in the search. */
|
|
3313
|
+
sources?: components["schemas"]["WebSearchActionSearchSource"][] | null;
|
|
3314
|
+
};
|
|
3315
|
+
WebSearchActionSearchSource: {
|
|
3316
|
+
/** @description The type of source. Always `url`. */
|
|
3317
|
+
type: string;
|
|
3318
|
+
/** @description The URL of the source. */
|
|
3319
|
+
url: string;
|
|
3320
|
+
};
|
|
3321
|
+
/** @description Approximate user location for web search. */
|
|
3322
|
+
WebSearchApproximateLocation: {
|
|
3323
|
+
/** @description The type of location approximation. Defaults to `approximate` when omitted in JSON input. */
|
|
3324
|
+
type?: components["schemas"]["WebSearchApproximateLocationType"];
|
|
3325
|
+
/** @description Free text input for the city of the user, e.g. `San Francisco`. */
|
|
3326
|
+
city?: string | null;
|
|
3327
|
+
/** @description The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user,
|
|
3328
|
+
* e.g. `US`. */
|
|
3329
|
+
country?: string | null;
|
|
3330
|
+
/** @description Free text input for the region of the user, e.g. `California`. */
|
|
3331
|
+
region?: string | null;
|
|
3332
|
+
/** @description The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g.
|
|
3333
|
+
* `America/Los_Angeles`. */
|
|
3334
|
+
timezone?: string | null;
|
|
3335
|
+
};
|
|
3336
|
+
/** @enum {string} */
|
|
3337
|
+
WebSearchApproximateLocationType: "approximate";
|
|
3338
|
+
/**
|
|
3339
|
+
* @description The amount of context window space to use for the search.
|
|
3340
|
+
* @enum {string}
|
|
3341
|
+
*/
|
|
3342
|
+
WebSearchContextSize: "low" | "medium" | "high";
|
|
3343
|
+
/** @description Approximate location parameters for the search. */
|
|
3344
|
+
WebSearchLocation: {
|
|
3345
|
+
/** @description The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. */
|
|
3346
|
+
country?: string | null;
|
|
3347
|
+
/** @description Free text input for the region of the user, e.g. `California`. */
|
|
3348
|
+
region?: string | null;
|
|
3349
|
+
/** @description Free text input for the city of the user, e.g. `San Francisco`. */
|
|
3350
|
+
city?: string | null;
|
|
3351
|
+
/** @description The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. */
|
|
3352
|
+
timezone?: string | null;
|
|
3353
|
+
};
|
|
3354
|
+
/** @description Options for the web search tool. */
|
|
3355
|
+
WebSearchOptions: {
|
|
3356
|
+
search_context_size?: null | components["schemas"]["WebSearchContextSize"];
|
|
3357
|
+
user_location?: null | components["schemas"]["WebSearchUserLocation"];
|
|
3358
|
+
};
|
|
3359
|
+
WebSearchTool: {
|
|
3360
|
+
filters?: null | components["schemas"]["WebSearchToolFilters"];
|
|
3361
|
+
user_location?: null | components["schemas"]["WebSearchApproximateLocation"];
|
|
3362
|
+
search_context_size?: null | components["schemas"]["WebSearchToolSearchContextSize"];
|
|
3363
|
+
/** @description The types of content to search for. */
|
|
3364
|
+
search_content_types?: components["schemas"]["SearchContentType"][] | null;
|
|
3365
|
+
};
|
|
3366
|
+
/** @description Web search tool call output. */
|
|
3367
|
+
WebSearchToolCall: {
|
|
3368
|
+
/** @description An object describing the specific action taken in this web search call. Includes
|
|
3369
|
+
* details on how the model used the web (search, open_page, find, find_in_page). */
|
|
3370
|
+
action: components["schemas"]["WebSearchToolCallAction"];
|
|
3371
|
+
/** @description The unique ID of the web search tool call. */
|
|
3372
|
+
id: string;
|
|
3373
|
+
/** @description The status of the web search tool call. */
|
|
3374
|
+
status: components["schemas"]["WebSearchToolCallStatus"];
|
|
3375
|
+
};
|
|
3376
|
+
WebSearchToolCallAction: (components["schemas"]["WebSearchActionSearch"] & {
|
|
3377
|
+
/** @enum {string} */
|
|
3378
|
+
type: "search";
|
|
3379
|
+
}) | (components["schemas"]["WebSearchActionOpenPage"] & {
|
|
3380
|
+
/** @enum {string} */
|
|
3381
|
+
type: "open_page";
|
|
3382
|
+
}) | (components["schemas"]["WebSearchActionFind"] & {
|
|
3383
|
+
/** @enum {string} */
|
|
3384
|
+
type: "find";
|
|
3385
|
+
}) | (components["schemas"]["WebSearchActionFind"] & {
|
|
3386
|
+
/** @enum {string} */
|
|
3387
|
+
type: "find_in_page";
|
|
3388
|
+
});
|
|
3389
|
+
/** @enum {string} */
|
|
3390
|
+
WebSearchToolCallStatus: "in_progress" | "searching" | "completed" | "failed";
|
|
3391
|
+
WebSearchToolFilters: {
|
|
3392
|
+
/** @description Allowed domains for the search. If not provided, all domains are allowed.
|
|
3393
|
+
* Subdomains of the provided domains are allowed as well.
|
|
3394
|
+
*
|
|
3395
|
+
* Example: `["pubmed.ncbi.nlm.nih.gov"]` */
|
|
3396
|
+
allowed_domains?: string[] | null;
|
|
3397
|
+
};
|
|
3398
|
+
/** @enum {string} */
|
|
3399
|
+
WebSearchToolSearchContextSize: "low" | "medium" | "high";
|
|
3400
|
+
WebSearchUserLocation: {
|
|
3401
|
+
type: components["schemas"]["WebSearchUserLocationType"];
|
|
3402
|
+
approximate: components["schemas"]["WebSearchLocation"];
|
|
3403
|
+
};
|
|
3404
|
+
/** @enum {string} */
|
|
3405
|
+
WebSearchUserLocationType: "approximate";
|
|
3406
|
+
/** @description Wrapper to deserialize the error object nested in "error" JSON key */
|
|
3407
|
+
WrappedError: {
|
|
3408
|
+
error: components["schemas"]["ApiError"];
|
|
3409
|
+
};
|
|
3410
|
+
};
|
|
3411
|
+
responses: never;
|
|
3412
|
+
parameters: never;
|
|
3413
|
+
requestBodies: never;
|
|
3414
|
+
headers: never;
|
|
3415
|
+
pathItems: never;
|
|
3416
|
+
}
|
|
3417
|
+
export type $defs = Record<string, never>;
|
|
3418
|
+
export interface operations {
|
|
3419
|
+
chatOllamaModel: {
|
|
3420
|
+
parameters: {
|
|
3421
|
+
query?: never;
|
|
3422
|
+
header?: never;
|
|
3423
|
+
path?: never;
|
|
3424
|
+
cookie?: never;
|
|
3425
|
+
};
|
|
3426
|
+
/** @description Chat request in Ollama format */
|
|
3427
|
+
requestBody: {
|
|
3428
|
+
content: {
|
|
3429
|
+
/** @example {
|
|
3430
|
+
* "messages": [
|
|
3431
|
+
* {
|
|
3432
|
+
* "content": "You are a helpful assistant.",
|
|
3433
|
+
* "role": "system"
|
|
3434
|
+
* },
|
|
3435
|
+
* {
|
|
3436
|
+
* "content": "Hello!",
|
|
3437
|
+
* "role": "user"
|
|
3438
|
+
* }
|
|
3439
|
+
* ],
|
|
3440
|
+
* "model": "llama2:chat",
|
|
3441
|
+
* "options": {
|
|
3442
|
+
* "num_predict": 100,
|
|
3443
|
+
* "temperature": 0.7
|
|
3444
|
+
* },
|
|
3445
|
+
* "stream": true
|
|
3446
|
+
* } */
|
|
3447
|
+
"application/json": components["schemas"]["ChatRequest"];
|
|
3448
|
+
};
|
|
3449
|
+
};
|
|
3450
|
+
responses: {
|
|
3451
|
+
/** @description Chat response */
|
|
3452
|
+
200: {
|
|
3453
|
+
headers: {
|
|
3454
|
+
[name: string]: unknown;
|
|
3455
|
+
};
|
|
3456
|
+
content: {
|
|
3457
|
+
/** @example {
|
|
3458
|
+
* "created_at": "2024-01-20T12:00:00.000000000Z",
|
|
3459
|
+
* "done": true,
|
|
3460
|
+
* "done_reason": "stop",
|
|
3461
|
+
* "eval_count": 10,
|
|
3462
|
+
* "eval_duration": "-1",
|
|
3463
|
+
* "load_duration": "-1",
|
|
3464
|
+
* "message": {
|
|
3465
|
+
* "content": "Hello! How can I help you today?",
|
|
3466
|
+
* "images": null,
|
|
3467
|
+
* "role": "assistant"
|
|
3468
|
+
* },
|
|
3469
|
+
* "model": "llama2:chat",
|
|
3470
|
+
* "prompt_eval_count": 20,
|
|
3471
|
+
* "prompt_eval_duration": "-1",
|
|
3472
|
+
* "total_duration": 0
|
|
3473
|
+
* } */
|
|
3474
|
+
"application/json": unknown;
|
|
3475
|
+
};
|
|
3476
|
+
};
|
|
3477
|
+
/** @description Invalid request parameters */
|
|
3478
|
+
400: {
|
|
3479
|
+
headers: {
|
|
3480
|
+
[name: string]: unknown;
|
|
3481
|
+
};
|
|
3482
|
+
content: {
|
|
3483
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3484
|
+
};
|
|
3485
|
+
};
|
|
3486
|
+
/** @description Not authenticated */
|
|
3487
|
+
401: {
|
|
3488
|
+
headers: {
|
|
3489
|
+
[name: string]: unknown;
|
|
3490
|
+
};
|
|
3491
|
+
content: {
|
|
3492
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3493
|
+
};
|
|
3494
|
+
};
|
|
3495
|
+
/** @description Insufficient permissions */
|
|
3496
|
+
403: {
|
|
3497
|
+
headers: {
|
|
3498
|
+
[name: string]: unknown;
|
|
3499
|
+
};
|
|
3500
|
+
content: {
|
|
3501
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3502
|
+
};
|
|
3503
|
+
};
|
|
3504
|
+
/** @description Model not found */
|
|
3505
|
+
404: {
|
|
3506
|
+
headers: {
|
|
3507
|
+
[name: string]: unknown;
|
|
3508
|
+
};
|
|
3509
|
+
content: {
|
|
3510
|
+
/** @example {
|
|
3511
|
+
* "error": "model not found"
|
|
3512
|
+
* } */
|
|
3513
|
+
"application/json": components["schemas"]["OllamaError"];
|
|
3514
|
+
};
|
|
3515
|
+
};
|
|
3516
|
+
/** @description Internal server error */
|
|
3517
|
+
500: {
|
|
3518
|
+
headers: {
|
|
3519
|
+
[name: string]: unknown;
|
|
3520
|
+
};
|
|
3521
|
+
content: {
|
|
3522
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3523
|
+
};
|
|
3524
|
+
};
|
|
3525
|
+
};
|
|
3526
|
+
};
|
|
3527
|
+
showOllamaModel: {
|
|
3528
|
+
parameters: {
|
|
3529
|
+
query?: never;
|
|
3530
|
+
header?: never;
|
|
3531
|
+
path?: never;
|
|
3532
|
+
cookie?: never;
|
|
3533
|
+
};
|
|
3534
|
+
/** @description Model name to get details for */
|
|
3535
|
+
requestBody: {
|
|
3536
|
+
content: {
|
|
3537
|
+
/** @example {
|
|
3538
|
+
* "name": "llama2:chat"
|
|
3539
|
+
* } */
|
|
3540
|
+
"application/json": components["schemas"]["ShowRequest"];
|
|
3541
|
+
};
|
|
3542
|
+
};
|
|
3543
|
+
responses: {
|
|
3544
|
+
/** @description Model details */
|
|
3545
|
+
200: {
|
|
3546
|
+
headers: {
|
|
3547
|
+
[name: string]: unknown;
|
|
3548
|
+
};
|
|
3549
|
+
content: {
|
|
3550
|
+
/** @example {
|
|
3551
|
+
* "details": {
|
|
3552
|
+
* "families": null,
|
|
3553
|
+
* "family": "unknown",
|
|
3554
|
+
* "format": "gguf",
|
|
3555
|
+
* "parameter_size": "",
|
|
3556
|
+
* "parent_model": null,
|
|
3557
|
+
* "quantization_level": ""
|
|
3558
|
+
* },
|
|
3559
|
+
* "license": "",
|
|
3560
|
+
* "model_info": {},
|
|
3561
|
+
* "modelfile": "",
|
|
3562
|
+
* "modified_at": "2024-01-20T12:00:00.000000000Z",
|
|
3563
|
+
* "parameters": "n_keep: 24\nstop:\n- <|start_header_id|>\n- <|end_header_id|>\n- <|eot_id|>\n",
|
|
3564
|
+
* "template": "llama2"
|
|
3565
|
+
* } */
|
|
3566
|
+
"application/json": components["schemas"]["ShowResponse"];
|
|
3567
|
+
};
|
|
3568
|
+
};
|
|
3569
|
+
/** @description Invalid request parameters */
|
|
3570
|
+
400: {
|
|
3571
|
+
headers: {
|
|
3572
|
+
[name: string]: unknown;
|
|
3573
|
+
};
|
|
3574
|
+
content: {
|
|
3575
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3576
|
+
};
|
|
3577
|
+
};
|
|
3578
|
+
/** @description Not authenticated */
|
|
3579
|
+
401: {
|
|
3580
|
+
headers: {
|
|
3581
|
+
[name: string]: unknown;
|
|
3582
|
+
};
|
|
3583
|
+
content: {
|
|
3584
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3585
|
+
};
|
|
3586
|
+
};
|
|
3587
|
+
/** @description Insufficient permissions */
|
|
3588
|
+
403: {
|
|
3589
|
+
headers: {
|
|
3590
|
+
[name: string]: unknown;
|
|
3591
|
+
};
|
|
3592
|
+
content: {
|
|
3593
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3594
|
+
};
|
|
3595
|
+
};
|
|
3596
|
+
/** @description Model not found */
|
|
3597
|
+
404: {
|
|
3598
|
+
headers: {
|
|
3599
|
+
[name: string]: unknown;
|
|
3600
|
+
};
|
|
3601
|
+
content: {
|
|
3602
|
+
/** @example {
|
|
3603
|
+
* "error": "model not found"
|
|
3604
|
+
* } */
|
|
3605
|
+
"application/json": components["schemas"]["OllamaError"];
|
|
3606
|
+
};
|
|
3607
|
+
};
|
|
3608
|
+
/** @description Internal server error */
|
|
3609
|
+
500: {
|
|
3610
|
+
headers: {
|
|
3611
|
+
[name: string]: unknown;
|
|
3612
|
+
};
|
|
3613
|
+
content: {
|
|
3614
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3615
|
+
};
|
|
3616
|
+
};
|
|
3617
|
+
};
|
|
3618
|
+
};
|
|
3619
|
+
listOllamaModels: {
|
|
3620
|
+
parameters: {
|
|
3621
|
+
query?: never;
|
|
3622
|
+
header?: never;
|
|
3623
|
+
path?: never;
|
|
3624
|
+
cookie?: never;
|
|
3625
|
+
};
|
|
3626
|
+
requestBody?: never;
|
|
3627
|
+
responses: {
|
|
3628
|
+
/** @description List of available models */
|
|
3629
|
+
200: {
|
|
3630
|
+
headers: {
|
|
3631
|
+
[name: string]: unknown;
|
|
3632
|
+
};
|
|
3633
|
+
content: {
|
|
3634
|
+
/** @example {
|
|
3635
|
+
* "models": [
|
|
3636
|
+
* {
|
|
3637
|
+
* "details": {
|
|
3638
|
+
* "families": null,
|
|
3639
|
+
* "family": "unknown",
|
|
3640
|
+
* "format": "gguf",
|
|
3641
|
+
* "parameter_size": "",
|
|
3642
|
+
* "parent_model": null,
|
|
3643
|
+
* "quantization_level": ""
|
|
3644
|
+
* },
|
|
3645
|
+
* "digest": "sha256:abc123",
|
|
3646
|
+
* "model": "llama2:chat",
|
|
3647
|
+
* "modified_at": "2024-01-20T12:00:00.000000000Z",
|
|
3648
|
+
* "size": 0
|
|
3649
|
+
* }
|
|
3650
|
+
* ]
|
|
3651
|
+
* } */
|
|
3652
|
+
"application/json": components["schemas"]["ModelsResponse"];
|
|
3653
|
+
};
|
|
3654
|
+
};
|
|
3655
|
+
/** @description Invalid request parameters */
|
|
3656
|
+
400: {
|
|
3657
|
+
headers: {
|
|
3658
|
+
[name: string]: unknown;
|
|
3659
|
+
};
|
|
3660
|
+
content: {
|
|
3661
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3662
|
+
};
|
|
3663
|
+
};
|
|
3664
|
+
/** @description Not authenticated */
|
|
3665
|
+
401: {
|
|
3666
|
+
headers: {
|
|
3667
|
+
[name: string]: unknown;
|
|
3668
|
+
};
|
|
3669
|
+
content: {
|
|
3670
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3671
|
+
};
|
|
3672
|
+
};
|
|
3673
|
+
/** @description Insufficient permissions */
|
|
3674
|
+
403: {
|
|
3675
|
+
headers: {
|
|
3676
|
+
[name: string]: unknown;
|
|
3677
|
+
};
|
|
3678
|
+
content: {
|
|
3679
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3680
|
+
};
|
|
3681
|
+
};
|
|
3682
|
+
/** @description Internal server error */
|
|
3683
|
+
500: {
|
|
3684
|
+
headers: {
|
|
3685
|
+
[name: string]: unknown;
|
|
3686
|
+
};
|
|
3687
|
+
content: {
|
|
3688
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3689
|
+
};
|
|
3690
|
+
};
|
|
3691
|
+
};
|
|
3692
|
+
};
|
|
3693
|
+
createChatCompletion: {
|
|
3694
|
+
parameters: {
|
|
3695
|
+
query?: never;
|
|
3696
|
+
header?: never;
|
|
3697
|
+
path?: never;
|
|
3698
|
+
cookie?: never;
|
|
3699
|
+
};
|
|
3700
|
+
requestBody: {
|
|
3701
|
+
content: {
|
|
3702
|
+
/** @example {
|
|
3703
|
+
* "max_tokens": 100,
|
|
3704
|
+
* "messages": [
|
|
3705
|
+
* {
|
|
3706
|
+
* "content": "You are a helpful assistant.",
|
|
3707
|
+
* "role": "system"
|
|
3708
|
+
* },
|
|
3709
|
+
* {
|
|
3710
|
+
* "content": "Hello!",
|
|
3711
|
+
* "role": "user"
|
|
3712
|
+
* }
|
|
3713
|
+
* ],
|
|
3714
|
+
* "model": "llama2:chat",
|
|
3715
|
+
* "stream": false,
|
|
3716
|
+
* "temperature": 0.7
|
|
3717
|
+
* } */
|
|
3718
|
+
"application/json": components["schemas"]["CreateChatCompletionRequest"];
|
|
3719
|
+
};
|
|
3720
|
+
};
|
|
3721
|
+
responses: {
|
|
3722
|
+
/** @description Chat completion response */
|
|
3723
|
+
200: {
|
|
3724
|
+
headers: {
|
|
3725
|
+
[name: string]: unknown;
|
|
3726
|
+
};
|
|
3727
|
+
content: {
|
|
3728
|
+
/** @example {
|
|
3729
|
+
* "choices": [
|
|
3730
|
+
* {
|
|
3731
|
+
* "finish_reason": "stop",
|
|
3732
|
+
* "index": 0,
|
|
3733
|
+
* "message": {
|
|
3734
|
+
* "content": "Hello! How can I help you today?",
|
|
3735
|
+
* "role": "assistant"
|
|
3736
|
+
* }
|
|
3737
|
+
* }
|
|
3738
|
+
* ],
|
|
3739
|
+
* "created": 1677610602,
|
|
3740
|
+
* "id": "chatcmpl-123",
|
|
3741
|
+
* "model": "llama2:chat",
|
|
3742
|
+
* "object": "chat.completion",
|
|
3743
|
+
* "usage": {
|
|
3744
|
+
* "completion_tokens": 10,
|
|
3745
|
+
* "prompt_tokens": 20,
|
|
3746
|
+
* "total_tokens": 30
|
|
3747
|
+
* }
|
|
3748
|
+
* } */
|
|
3749
|
+
"application/json": components["schemas"]["CreateChatCompletionResponse"];
|
|
3750
|
+
};
|
|
3751
|
+
};
|
|
3752
|
+
/** @description Chat completion stream, the status is 200, using 201 to avoid OpenAPI format limitation. */
|
|
3753
|
+
201: {
|
|
3754
|
+
headers: {
|
|
3755
|
+
/** @description No-cache directive */
|
|
3756
|
+
"Cache-Control"?: string;
|
|
3757
|
+
[name: string]: unknown;
|
|
3758
|
+
};
|
|
3759
|
+
content: {
|
|
3760
|
+
/** @example {
|
|
3761
|
+
* "choices": [
|
|
3762
|
+
* {
|
|
3763
|
+
* "delta": {
|
|
3764
|
+
* "content": "Hello"
|
|
3765
|
+
* },
|
|
3766
|
+
* "finish_reason": null,
|
|
3767
|
+
* "index": 0
|
|
3768
|
+
* }
|
|
3769
|
+
* ],
|
|
3770
|
+
* "created": 1694268190,
|
|
3771
|
+
* "id": "chatcmpl-123",
|
|
3772
|
+
* "model": "llama2:chat",
|
|
3773
|
+
* "object": "chat.completion.chunk"
|
|
3774
|
+
* } */
|
|
3775
|
+
"text/event-stream": components["schemas"]["CreateChatCompletionStreamResponse"];
|
|
3776
|
+
};
|
|
3777
|
+
};
|
|
3778
|
+
/** @description Invalid request parameters */
|
|
3779
|
+
400: {
|
|
3780
|
+
headers: {
|
|
3781
|
+
[name: string]: unknown;
|
|
3782
|
+
};
|
|
3783
|
+
content: {
|
|
3784
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3785
|
+
};
|
|
3786
|
+
};
|
|
3787
|
+
/** @description Not authenticated */
|
|
3788
|
+
401: {
|
|
3789
|
+
headers: {
|
|
3790
|
+
[name: string]: unknown;
|
|
3791
|
+
};
|
|
3792
|
+
content: {
|
|
3793
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3794
|
+
};
|
|
3795
|
+
};
|
|
3796
|
+
/** @description Insufficient permissions */
|
|
3797
|
+
403: {
|
|
3798
|
+
headers: {
|
|
3799
|
+
[name: string]: unknown;
|
|
3800
|
+
};
|
|
3801
|
+
content: {
|
|
3802
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3803
|
+
};
|
|
3804
|
+
};
|
|
3805
|
+
/** @description Internal server error */
|
|
3806
|
+
500: {
|
|
3807
|
+
headers: {
|
|
3808
|
+
[name: string]: unknown;
|
|
3809
|
+
};
|
|
3810
|
+
content: {
|
|
3811
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3812
|
+
};
|
|
3813
|
+
};
|
|
3814
|
+
};
|
|
3815
|
+
};
|
|
3816
|
+
createEmbedding: {
|
|
3817
|
+
parameters: {
|
|
3818
|
+
query?: never;
|
|
3819
|
+
header?: never;
|
|
3820
|
+
path?: never;
|
|
3821
|
+
cookie?: never;
|
|
3822
|
+
};
|
|
3823
|
+
requestBody: {
|
|
3824
|
+
content: {
|
|
3825
|
+
/** @example {
|
|
3826
|
+
* "input": "The quick brown fox jumps over the lazy dog",
|
|
3827
|
+
* "model": "text-embedding-model"
|
|
3828
|
+
* } */
|
|
3829
|
+
"application/json": components["schemas"]["CreateEmbeddingRequest"];
|
|
3830
|
+
};
|
|
3831
|
+
};
|
|
3832
|
+
responses: {
|
|
3833
|
+
/** @description Embedding response */
|
|
3834
|
+
200: {
|
|
3835
|
+
headers: {
|
|
3836
|
+
[name: string]: unknown;
|
|
3837
|
+
};
|
|
3838
|
+
content: {
|
|
3839
|
+
/** @example {
|
|
3840
|
+
* "data": [
|
|
3841
|
+
* {
|
|
3842
|
+
* "embedding": [
|
|
3843
|
+
* 0.1,
|
|
3844
|
+
* 0.2,
|
|
3845
|
+
* 0.3
|
|
3846
|
+
* ],
|
|
3847
|
+
* "index": 0,
|
|
3848
|
+
* "object": "embedding"
|
|
3849
|
+
* }
|
|
3850
|
+
* ],
|
|
3851
|
+
* "model": "text-embedding-model",
|
|
3852
|
+
* "object": "list",
|
|
3853
|
+
* "usage": {
|
|
3854
|
+
* "prompt_tokens": 8,
|
|
3855
|
+
* "total_tokens": 8
|
|
3856
|
+
* }
|
|
3857
|
+
* } */
|
|
3858
|
+
"application/json": components["schemas"]["CreateEmbeddingResponse"];
|
|
3859
|
+
};
|
|
3860
|
+
};
|
|
3861
|
+
/** @description Invalid request parameters */
|
|
3862
|
+
400: {
|
|
3863
|
+
headers: {
|
|
3864
|
+
[name: string]: unknown;
|
|
3865
|
+
};
|
|
3866
|
+
content: {
|
|
3867
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3868
|
+
};
|
|
3869
|
+
};
|
|
3870
|
+
/** @description Not authenticated */
|
|
3871
|
+
401: {
|
|
3872
|
+
headers: {
|
|
3873
|
+
[name: string]: unknown;
|
|
3874
|
+
};
|
|
3875
|
+
content: {
|
|
3876
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3877
|
+
};
|
|
3878
|
+
};
|
|
3879
|
+
/** @description Insufficient permissions */
|
|
3880
|
+
403: {
|
|
3881
|
+
headers: {
|
|
3882
|
+
[name: string]: unknown;
|
|
3883
|
+
};
|
|
3884
|
+
content: {
|
|
3885
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3886
|
+
};
|
|
3887
|
+
};
|
|
3888
|
+
/** @description Internal server error */
|
|
3889
|
+
500: {
|
|
3890
|
+
headers: {
|
|
3891
|
+
[name: string]: unknown;
|
|
3892
|
+
};
|
|
3893
|
+
content: {
|
|
3894
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3895
|
+
};
|
|
3896
|
+
};
|
|
3897
|
+
};
|
|
3898
|
+
};
|
|
3899
|
+
listModels: {
|
|
3900
|
+
parameters: {
|
|
3901
|
+
query?: never;
|
|
3902
|
+
header?: never;
|
|
3903
|
+
path?: never;
|
|
3904
|
+
cookie?: never;
|
|
3905
|
+
};
|
|
3906
|
+
requestBody?: never;
|
|
3907
|
+
responses: {
|
|
3908
|
+
/** @description List of available models */
|
|
3909
|
+
200: {
|
|
3910
|
+
headers: {
|
|
3911
|
+
[name: string]: unknown;
|
|
3912
|
+
};
|
|
3913
|
+
content: {
|
|
3914
|
+
/** @example {
|
|
3915
|
+
* "data": [
|
|
3916
|
+
* {
|
|
3917
|
+
* "created": 1677610602,
|
|
3918
|
+
* "id": "llama2:chat",
|
|
3919
|
+
* "object": "model",
|
|
3920
|
+
* "owned_by": "bodhi"
|
|
3921
|
+
* },
|
|
3922
|
+
* {
|
|
3923
|
+
* "created": 1677610602,
|
|
3924
|
+
* "id": "mistral:instruct",
|
|
3925
|
+
* "object": "model",
|
|
3926
|
+
* "owned_by": "bodhi"
|
|
3927
|
+
* }
|
|
3928
|
+
* ],
|
|
3929
|
+
* "object": "list"
|
|
3930
|
+
* } */
|
|
3931
|
+
"application/json": components["schemas"]["ListModelResponse"];
|
|
3932
|
+
};
|
|
3933
|
+
};
|
|
3934
|
+
/** @description Invalid request parameters */
|
|
3935
|
+
400: {
|
|
3936
|
+
headers: {
|
|
3937
|
+
[name: string]: unknown;
|
|
3938
|
+
};
|
|
3939
|
+
content: {
|
|
3940
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3941
|
+
};
|
|
3942
|
+
};
|
|
3943
|
+
/** @description Not authenticated */
|
|
3944
|
+
401: {
|
|
3945
|
+
headers: {
|
|
3946
|
+
[name: string]: unknown;
|
|
3947
|
+
};
|
|
3948
|
+
content: {
|
|
3949
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3950
|
+
};
|
|
3951
|
+
};
|
|
3952
|
+
/** @description Insufficient permissions */
|
|
3953
|
+
403: {
|
|
3954
|
+
headers: {
|
|
3955
|
+
[name: string]: unknown;
|
|
3956
|
+
};
|
|
3957
|
+
content: {
|
|
3958
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3959
|
+
};
|
|
3960
|
+
};
|
|
3961
|
+
/** @description Internal server error */
|
|
3962
|
+
500: {
|
|
3963
|
+
headers: {
|
|
3964
|
+
[name: string]: unknown;
|
|
3965
|
+
};
|
|
3966
|
+
content: {
|
|
3967
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
3968
|
+
};
|
|
3969
|
+
};
|
|
3970
|
+
};
|
|
3971
|
+
};
|
|
3972
|
+
getModel: {
|
|
3973
|
+
parameters: {
|
|
3974
|
+
query?: never;
|
|
3975
|
+
header?: never;
|
|
3976
|
+
path: {
|
|
3977
|
+
/**
|
|
3978
|
+
* @description Model identifier - can be user alias (e.g., 'llama2:chat'), model alias, or API provider alias
|
|
3979
|
+
* @example llama2:chat
|
|
3980
|
+
*/
|
|
3981
|
+
id: string;
|
|
3982
|
+
};
|
|
3983
|
+
cookie?: never;
|
|
3984
|
+
};
|
|
3985
|
+
requestBody?: never;
|
|
3986
|
+
responses: {
|
|
3987
|
+
/** @description Model details */
|
|
3988
|
+
200: {
|
|
3989
|
+
headers: {
|
|
3990
|
+
[name: string]: unknown;
|
|
3991
|
+
};
|
|
3992
|
+
content: {
|
|
3993
|
+
/** @example {
|
|
3994
|
+
* "created": 1677610602,
|
|
3995
|
+
* "id": "llama2:chat",
|
|
3996
|
+
* "object": "model",
|
|
3997
|
+
* "owned_by": "system"
|
|
3998
|
+
* } */
|
|
3999
|
+
"application/json": components["schemas"]["Model"];
|
|
4000
|
+
};
|
|
4001
|
+
};
|
|
4002
|
+
/** @description Invalid request parameters */
|
|
4003
|
+
400: {
|
|
4004
|
+
headers: {
|
|
4005
|
+
[name: string]: unknown;
|
|
4006
|
+
};
|
|
4007
|
+
content: {
|
|
4008
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4009
|
+
};
|
|
4010
|
+
};
|
|
4011
|
+
/** @description Not authenticated */
|
|
4012
|
+
401: {
|
|
4013
|
+
headers: {
|
|
4014
|
+
[name: string]: unknown;
|
|
4015
|
+
};
|
|
4016
|
+
content: {
|
|
4017
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4018
|
+
};
|
|
4019
|
+
};
|
|
4020
|
+
/** @description Insufficient permissions */
|
|
4021
|
+
403: {
|
|
4022
|
+
headers: {
|
|
4023
|
+
[name: string]: unknown;
|
|
4024
|
+
};
|
|
4025
|
+
content: {
|
|
4026
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
/** @description Model not found */
|
|
4030
|
+
404: {
|
|
4031
|
+
headers: {
|
|
4032
|
+
[name: string]: unknown;
|
|
4033
|
+
};
|
|
4034
|
+
content: {
|
|
4035
|
+
/** @example {
|
|
4036
|
+
* "error": {
|
|
4037
|
+
* "code": "model_not_found",
|
|
4038
|
+
* "message": "Model 'unknown:model' not found",
|
|
4039
|
+
* "type": "not_found_error"
|
|
4040
|
+
* }
|
|
4041
|
+
* } */
|
|
4042
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4043
|
+
};
|
|
4044
|
+
};
|
|
4045
|
+
/** @description Internal server error */
|
|
4046
|
+
500: {
|
|
4047
|
+
headers: {
|
|
4048
|
+
[name: string]: unknown;
|
|
4049
|
+
};
|
|
4050
|
+
content: {
|
|
4051
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4052
|
+
};
|
|
4053
|
+
};
|
|
4054
|
+
};
|
|
4055
|
+
};
|
|
4056
|
+
createResponse: {
|
|
4057
|
+
parameters: {
|
|
4058
|
+
query?: never;
|
|
4059
|
+
header?: never;
|
|
4060
|
+
path?: never;
|
|
4061
|
+
cookie?: never;
|
|
4062
|
+
};
|
|
4063
|
+
requestBody: {
|
|
4064
|
+
content: {
|
|
4065
|
+
"application/json": components["schemas"]["CreateResponse"];
|
|
4066
|
+
};
|
|
4067
|
+
};
|
|
4068
|
+
responses: {
|
|
4069
|
+
/** @description Response created */
|
|
4070
|
+
200: {
|
|
4071
|
+
headers: {
|
|
4072
|
+
[name: string]: unknown;
|
|
4073
|
+
};
|
|
4074
|
+
content: {
|
|
4075
|
+
"application/json": components["schemas"]["Response"];
|
|
4076
|
+
};
|
|
4077
|
+
};
|
|
4078
|
+
/** @description Response stream (actual status is 200, using 201 to avoid OpenAPI limitation). */
|
|
4079
|
+
201: {
|
|
4080
|
+
headers: {
|
|
4081
|
+
[name: string]: unknown;
|
|
4082
|
+
};
|
|
4083
|
+
content: {
|
|
4084
|
+
"text/event-stream": unknown;
|
|
4085
|
+
};
|
|
4086
|
+
};
|
|
4087
|
+
/** @description Invalid request parameters */
|
|
4088
|
+
400: {
|
|
4089
|
+
headers: {
|
|
4090
|
+
[name: string]: unknown;
|
|
4091
|
+
};
|
|
4092
|
+
content: {
|
|
4093
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
4096
|
+
/** @description Not authenticated */
|
|
4097
|
+
401: {
|
|
4098
|
+
headers: {
|
|
4099
|
+
[name: string]: unknown;
|
|
4100
|
+
};
|
|
4101
|
+
content: {
|
|
4102
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4103
|
+
};
|
|
4104
|
+
};
|
|
4105
|
+
/** @description Insufficient permissions */
|
|
4106
|
+
403: {
|
|
4107
|
+
headers: {
|
|
4108
|
+
[name: string]: unknown;
|
|
4109
|
+
};
|
|
4110
|
+
content: {
|
|
4111
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4112
|
+
};
|
|
4113
|
+
};
|
|
4114
|
+
/** @description Internal server error */
|
|
4115
|
+
500: {
|
|
4116
|
+
headers: {
|
|
4117
|
+
[name: string]: unknown;
|
|
4118
|
+
};
|
|
4119
|
+
content: {
|
|
4120
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4121
|
+
};
|
|
4122
|
+
};
|
|
4123
|
+
};
|
|
4124
|
+
};
|
|
4125
|
+
getResponse: {
|
|
4126
|
+
parameters: {
|
|
4127
|
+
query: {
|
|
4128
|
+
/** @description Model name for routing to the correct upstream provider */
|
|
4129
|
+
model: string;
|
|
4130
|
+
};
|
|
4131
|
+
header?: never;
|
|
4132
|
+
path: {
|
|
4133
|
+
/** @description The response ID */
|
|
4134
|
+
response_id: string;
|
|
4135
|
+
};
|
|
4136
|
+
cookie?: never;
|
|
4137
|
+
};
|
|
4138
|
+
requestBody?: never;
|
|
4139
|
+
responses: {
|
|
4140
|
+
/** @description Response retrieved */
|
|
4141
|
+
200: {
|
|
4142
|
+
headers: {
|
|
4143
|
+
[name: string]: unknown;
|
|
4144
|
+
};
|
|
4145
|
+
content: {
|
|
4146
|
+
"application/json": components["schemas"]["Response"];
|
|
4147
|
+
};
|
|
4148
|
+
};
|
|
4149
|
+
/** @description Invalid request parameters */
|
|
4150
|
+
400: {
|
|
4151
|
+
headers: {
|
|
4152
|
+
[name: string]: unknown;
|
|
4153
|
+
};
|
|
4154
|
+
content: {
|
|
4155
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4156
|
+
};
|
|
4157
|
+
};
|
|
4158
|
+
/** @description Not authenticated */
|
|
4159
|
+
401: {
|
|
4160
|
+
headers: {
|
|
4161
|
+
[name: string]: unknown;
|
|
4162
|
+
};
|
|
4163
|
+
content: {
|
|
4164
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4165
|
+
};
|
|
4166
|
+
};
|
|
4167
|
+
/** @description Insufficient permissions */
|
|
4168
|
+
403: {
|
|
4169
|
+
headers: {
|
|
4170
|
+
[name: string]: unknown;
|
|
4171
|
+
};
|
|
4172
|
+
content: {
|
|
4173
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
4176
|
+
/** @description Internal server error */
|
|
4177
|
+
500: {
|
|
4178
|
+
headers: {
|
|
4179
|
+
[name: string]: unknown;
|
|
4180
|
+
};
|
|
4181
|
+
content: {
|
|
4182
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4183
|
+
};
|
|
4184
|
+
};
|
|
4185
|
+
};
|
|
4186
|
+
};
|
|
4187
|
+
deleteResponse: {
|
|
4188
|
+
parameters: {
|
|
4189
|
+
query: {
|
|
4190
|
+
/** @description Model name for routing to the correct upstream provider */
|
|
4191
|
+
model: string;
|
|
4192
|
+
};
|
|
4193
|
+
header?: never;
|
|
4194
|
+
path: {
|
|
4195
|
+
/** @description The response ID */
|
|
4196
|
+
response_id: string;
|
|
4197
|
+
};
|
|
4198
|
+
cookie?: never;
|
|
4199
|
+
};
|
|
4200
|
+
requestBody?: never;
|
|
4201
|
+
responses: {
|
|
4202
|
+
/** @description Response deleted */
|
|
4203
|
+
200: {
|
|
4204
|
+
headers: {
|
|
4205
|
+
[name: string]: unknown;
|
|
4206
|
+
};
|
|
4207
|
+
content: {
|
|
4208
|
+
"application/json": components["schemas"]["DeleteResponse"];
|
|
4209
|
+
};
|
|
4210
|
+
};
|
|
4211
|
+
/** @description Invalid request parameters */
|
|
4212
|
+
400: {
|
|
4213
|
+
headers: {
|
|
4214
|
+
[name: string]: unknown;
|
|
4215
|
+
};
|
|
4216
|
+
content: {
|
|
4217
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4218
|
+
};
|
|
4219
|
+
};
|
|
4220
|
+
/** @description Not authenticated */
|
|
4221
|
+
401: {
|
|
4222
|
+
headers: {
|
|
4223
|
+
[name: string]: unknown;
|
|
4224
|
+
};
|
|
4225
|
+
content: {
|
|
4226
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4227
|
+
};
|
|
4228
|
+
};
|
|
4229
|
+
/** @description Insufficient permissions */
|
|
4230
|
+
403: {
|
|
4231
|
+
headers: {
|
|
4232
|
+
[name: string]: unknown;
|
|
4233
|
+
};
|
|
4234
|
+
content: {
|
|
4235
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4236
|
+
};
|
|
4237
|
+
};
|
|
4238
|
+
/** @description Internal server error */
|
|
4239
|
+
500: {
|
|
4240
|
+
headers: {
|
|
4241
|
+
[name: string]: unknown;
|
|
4242
|
+
};
|
|
4243
|
+
content: {
|
|
4244
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4245
|
+
};
|
|
4246
|
+
};
|
|
4247
|
+
};
|
|
4248
|
+
};
|
|
4249
|
+
cancelResponse: {
|
|
4250
|
+
parameters: {
|
|
4251
|
+
query: {
|
|
4252
|
+
/** @description Model name for routing to the correct upstream provider */
|
|
4253
|
+
model: string;
|
|
4254
|
+
};
|
|
4255
|
+
header?: never;
|
|
4256
|
+
path: {
|
|
4257
|
+
/** @description The response ID */
|
|
4258
|
+
response_id: string;
|
|
4259
|
+
};
|
|
4260
|
+
cookie?: never;
|
|
4261
|
+
};
|
|
4262
|
+
requestBody?: never;
|
|
4263
|
+
responses: {
|
|
4264
|
+
/** @description Response cancelled */
|
|
4265
|
+
200: {
|
|
4266
|
+
headers: {
|
|
4267
|
+
[name: string]: unknown;
|
|
4268
|
+
};
|
|
4269
|
+
content: {
|
|
4270
|
+
"application/json": components["schemas"]["Response"];
|
|
4271
|
+
};
|
|
4272
|
+
};
|
|
4273
|
+
/** @description Invalid request parameters */
|
|
4274
|
+
400: {
|
|
4275
|
+
headers: {
|
|
4276
|
+
[name: string]: unknown;
|
|
4277
|
+
};
|
|
4278
|
+
content: {
|
|
4279
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4280
|
+
};
|
|
4281
|
+
};
|
|
4282
|
+
/** @description Not authenticated */
|
|
4283
|
+
401: {
|
|
4284
|
+
headers: {
|
|
4285
|
+
[name: string]: unknown;
|
|
4286
|
+
};
|
|
4287
|
+
content: {
|
|
4288
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4289
|
+
};
|
|
4290
|
+
};
|
|
4291
|
+
/** @description Insufficient permissions */
|
|
4292
|
+
403: {
|
|
4293
|
+
headers: {
|
|
4294
|
+
[name: string]: unknown;
|
|
4295
|
+
};
|
|
4296
|
+
content: {
|
|
4297
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4298
|
+
};
|
|
4299
|
+
};
|
|
4300
|
+
/** @description Internal server error */
|
|
4301
|
+
500: {
|
|
4302
|
+
headers: {
|
|
4303
|
+
[name: string]: unknown;
|
|
4304
|
+
};
|
|
4305
|
+
content: {
|
|
4306
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4307
|
+
};
|
|
4308
|
+
};
|
|
4309
|
+
};
|
|
4310
|
+
};
|
|
4311
|
+
listResponseInputItems: {
|
|
4312
|
+
parameters: {
|
|
4313
|
+
query: {
|
|
4314
|
+
/** @description Model name for routing to the correct upstream provider */
|
|
4315
|
+
model: string;
|
|
4316
|
+
};
|
|
4317
|
+
header?: never;
|
|
4318
|
+
path: {
|
|
4319
|
+
/** @description The response ID */
|
|
4320
|
+
response_id: string;
|
|
4321
|
+
};
|
|
4322
|
+
cookie?: never;
|
|
4323
|
+
};
|
|
4324
|
+
requestBody?: never;
|
|
4325
|
+
responses: {
|
|
4326
|
+
/** @description Input items retrieved */
|
|
4327
|
+
200: {
|
|
4328
|
+
headers: {
|
|
4329
|
+
[name: string]: unknown;
|
|
4330
|
+
};
|
|
4331
|
+
content?: never;
|
|
4332
|
+
};
|
|
4333
|
+
/** @description Invalid request parameters */
|
|
4334
|
+
400: {
|
|
4335
|
+
headers: {
|
|
4336
|
+
[name: string]: unknown;
|
|
4337
|
+
};
|
|
4338
|
+
content: {
|
|
4339
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4340
|
+
};
|
|
4341
|
+
};
|
|
4342
|
+
/** @description Not authenticated */
|
|
4343
|
+
401: {
|
|
4344
|
+
headers: {
|
|
4345
|
+
[name: string]: unknown;
|
|
4346
|
+
};
|
|
4347
|
+
content: {
|
|
4348
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4349
|
+
};
|
|
4350
|
+
};
|
|
4351
|
+
/** @description Insufficient permissions */
|
|
4352
|
+
403: {
|
|
4353
|
+
headers: {
|
|
4354
|
+
[name: string]: unknown;
|
|
4355
|
+
};
|
|
4356
|
+
content: {
|
|
4357
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4358
|
+
};
|
|
4359
|
+
};
|
|
4360
|
+
/** @description Internal server error */
|
|
4361
|
+
500: {
|
|
4362
|
+
headers: {
|
|
4363
|
+
[name: string]: unknown;
|
|
4364
|
+
};
|
|
4365
|
+
content: {
|
|
4366
|
+
"application/json": components["schemas"]["WrappedError"];
|
|
4367
|
+
};
|
|
4368
|
+
};
|
|
4369
|
+
};
|
|
4370
|
+
};
|
|
4371
|
+
}
|