@openai/agents-core 0.1.10 → 0.2.0
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/agent.d.ts +8 -5
- package/dist/agent.js +4 -3
- package/dist/agent.js.map +1 -1
- package/dist/agent.mjs +4 -3
- package/dist/agent.mjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/items.d.ts +424 -80
- package/dist/metadata.js +2 -2
- package/dist/metadata.js.map +1 -1
- package/dist/metadata.mjs +2 -2
- package/dist/metadata.mjs.map +1 -1
- package/dist/runImplementation.js +346 -0
- package/dist/runImplementation.js.map +1 -1
- package/dist/runImplementation.mjs +346 -0
- package/dist/runImplementation.mjs.map +1 -1
- package/dist/runState.d.ts +2416 -225
- package/dist/shims/shims-browser.d.ts +1 -1
- package/dist/shims/shims-workerd.d.ts +1 -1
- package/dist/tool.d.ts +5 -5
- package/dist/tool.js +2 -0
- package/dist/tool.js.map +1 -1
- package/dist/tool.mjs +2 -0
- package/dist/tool.mjs.map +1 -1
- package/dist/types/helpers.d.ts +3 -3
- package/dist/types/protocol.d.ts +1249 -205
- package/dist/types/protocol.js +101 -19
- package/dist/types/protocol.js.map +1 -1
- package/dist/types/protocol.mjs +100 -18
- package/dist/types/protocol.mjs.map +1 -1
- package/dist/utils/base64.d.ts +4 -0
- package/dist/utils/base64.js +43 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/base64.mjs +40 -0
- package/dist/utils/base64.mjs.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +1 -0
- package/dist/utils/index.mjs.map +1 -1
- package/dist/utils/smartString.js +56 -3
- package/dist/utils/smartString.js.map +1 -1
- package/dist/utils/smartString.mjs +56 -3
- package/dist/utils/smartString.mjs.map +1 -1
- package/dist/utils/tools.js +24 -6
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/tools.mjs +24 -6
- package/dist/utils/tools.mjs.map +1 -1
- package/dist/utils/typeGuards.d.ts +2 -2
- package/dist/utils/typeGuards.js +7 -7
- package/dist/utils/typeGuards.js.map +1 -1
- package/dist/utils/typeGuards.mjs +7 -7
- package/dist/utils/typeGuards.mjs.map +1 -1
- package/dist/utils/zodCompat.d.ts +13 -0
- package/dist/utils/zodCompat.js +29 -0
- package/dist/utils/zodCompat.js.map +1 -0
- package/dist/utils/zodCompat.mjs +24 -0
- package/dist/utils/zodCompat.mjs.map +1 -0
- package/dist/utils/zodJsonSchemaCompat.d.ts +29 -0
- package/dist/utils/zodJsonSchemaCompat.js +282 -0
- package/dist/utils/zodJsonSchemaCompat.js.map +1 -0
- package/dist/utils/zodJsonSchemaCompat.mjs +278 -0
- package/dist/utils/zodJsonSchemaCompat.mjs.map +1 -0
- package/package.json +3 -3
package/dist/types/protocol.d.ts
CHANGED
|
@@ -135,27 +135,35 @@ export declare const InputImage: z.ZodObject<{
|
|
|
135
135
|
} & {
|
|
136
136
|
type: z.ZodLiteral<"input_image">;
|
|
137
137
|
/**
|
|
138
|
-
* The image input to the model. Could be a URL,
|
|
138
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
139
|
+
* previously uploaded OpenAI file.
|
|
139
140
|
*/
|
|
140
|
-
image: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
141
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
141
142
|
id: z.ZodString;
|
|
142
143
|
}, "strip", z.ZodTypeAny, {
|
|
143
144
|
id: string;
|
|
144
145
|
}, {
|
|
145
146
|
id: string;
|
|
146
|
-
}>]
|
|
147
|
+
}>]>>;
|
|
148
|
+
/**
|
|
149
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
150
|
+
* Future models may add new values, therefore this accepts any string.
|
|
151
|
+
*/
|
|
152
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
147
153
|
}, "strip", z.ZodTypeAny, {
|
|
148
154
|
type: "input_image";
|
|
149
|
-
image: string | {
|
|
150
|
-
id: string;
|
|
151
|
-
};
|
|
152
155
|
providerData?: Record<string, any> | undefined;
|
|
156
|
+
image?: string | {
|
|
157
|
+
id: string;
|
|
158
|
+
} | undefined;
|
|
159
|
+
detail?: string | undefined;
|
|
153
160
|
}, {
|
|
154
161
|
type: "input_image";
|
|
155
|
-
image: string | {
|
|
156
|
-
id: string;
|
|
157
|
-
};
|
|
158
162
|
providerData?: Record<string, any> | undefined;
|
|
163
|
+
image?: string | {
|
|
164
|
+
id: string;
|
|
165
|
+
} | undefined;
|
|
166
|
+
detail?: string | undefined;
|
|
159
167
|
}>;
|
|
160
168
|
export type InputImage = z.infer<typeof InputImage>;
|
|
161
169
|
export declare const InputFile: z.ZodObject<{
|
|
@@ -167,9 +175,9 @@ export declare const InputFile: z.ZodObject<{
|
|
|
167
175
|
} & {
|
|
168
176
|
type: z.ZodLiteral<"input_file">;
|
|
169
177
|
/**
|
|
170
|
-
* The file input to the model. Could be a URL,
|
|
178
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
171
179
|
*/
|
|
172
|
-
file: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
180
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
173
181
|
id: z.ZodString;
|
|
174
182
|
}, "strip", z.ZodTypeAny, {
|
|
175
183
|
id: string;
|
|
@@ -181,23 +189,29 @@ export declare const InputFile: z.ZodObject<{
|
|
|
181
189
|
url: string;
|
|
182
190
|
}, {
|
|
183
191
|
url: string;
|
|
184
|
-
}>]
|
|
192
|
+
}>]>>;
|
|
193
|
+
/**
|
|
194
|
+
* Optional filename metadata when uploading file data inline.
|
|
195
|
+
*/
|
|
196
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
185
197
|
}, "strip", z.ZodTypeAny, {
|
|
186
198
|
type: "input_file";
|
|
187
|
-
|
|
199
|
+
providerData?: Record<string, any> | undefined;
|
|
200
|
+
file?: string | {
|
|
188
201
|
id: string;
|
|
189
202
|
} | {
|
|
190
203
|
url: string;
|
|
191
|
-
};
|
|
192
|
-
|
|
204
|
+
} | undefined;
|
|
205
|
+
filename?: string | undefined;
|
|
193
206
|
}, {
|
|
194
207
|
type: "input_file";
|
|
195
|
-
|
|
208
|
+
providerData?: Record<string, any> | undefined;
|
|
209
|
+
file?: string | {
|
|
196
210
|
id: string;
|
|
197
211
|
} | {
|
|
198
212
|
url: string;
|
|
199
|
-
};
|
|
200
|
-
|
|
213
|
+
} | undefined;
|
|
214
|
+
filename?: string | undefined;
|
|
201
215
|
}>;
|
|
202
216
|
export type InputFile = z.infer<typeof InputFile>;
|
|
203
217
|
export declare const AudioContent: z.ZodObject<{
|
|
@@ -287,6 +301,7 @@ export declare const ToolOutputText: z.ZodObject<{
|
|
|
287
301
|
text: string;
|
|
288
302
|
providerData?: Record<string, any> | undefined;
|
|
289
303
|
}>;
|
|
304
|
+
export type ToolOutputText = z.infer<typeof ToolOutputText>;
|
|
290
305
|
export declare const ToolOutputImage: z.ZodObject<{
|
|
291
306
|
/**
|
|
292
307
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -296,24 +311,135 @@ export declare const ToolOutputImage: z.ZodObject<{
|
|
|
296
311
|
} & {
|
|
297
312
|
type: z.ZodLiteral<"image">;
|
|
298
313
|
/**
|
|
299
|
-
*
|
|
314
|
+
* Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
|
|
315
|
+
* object describing the data/url/fileId source.
|
|
300
316
|
*/
|
|
301
|
-
|
|
317
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
318
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
319
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
322
|
+
mediaType?: string | undefined;
|
|
323
|
+
}, {
|
|
324
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
325
|
+
mediaType?: string | undefined;
|
|
326
|
+
}>, z.ZodObject<{
|
|
327
|
+
url: z.ZodString;
|
|
328
|
+
}, "strip", z.ZodTypeAny, {
|
|
329
|
+
url: string;
|
|
330
|
+
}, {
|
|
331
|
+
url: string;
|
|
332
|
+
}>, z.ZodObject<{
|
|
333
|
+
fileId: z.ZodString;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
fileId: string;
|
|
336
|
+
}, {
|
|
337
|
+
fileId: string;
|
|
338
|
+
}>]>]>>;
|
|
302
339
|
/**
|
|
303
|
-
*
|
|
340
|
+
* Controls the requested level of detail for vision models.
|
|
341
|
+
* Use a string to avoid constraining future model capabilities.
|
|
304
342
|
*/
|
|
305
|
-
|
|
343
|
+
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
|
|
306
344
|
}, "strip", z.ZodTypeAny, {
|
|
307
345
|
type: "image";
|
|
308
|
-
data: string;
|
|
309
|
-
mediaType: string;
|
|
310
346
|
providerData?: Record<string, any> | undefined;
|
|
347
|
+
image?: string | {
|
|
348
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
349
|
+
mediaType?: string | undefined;
|
|
350
|
+
} | {
|
|
351
|
+
url: string;
|
|
352
|
+
} | {
|
|
353
|
+
fileId: string;
|
|
354
|
+
} | undefined;
|
|
355
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
311
356
|
}, {
|
|
312
357
|
type: "image";
|
|
313
|
-
|
|
314
|
-
|
|
358
|
+
providerData?: Record<string, any> | undefined;
|
|
359
|
+
image?: string | {
|
|
360
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
361
|
+
mediaType?: string | undefined;
|
|
362
|
+
} | {
|
|
363
|
+
url: string;
|
|
364
|
+
} | {
|
|
365
|
+
fileId: string;
|
|
366
|
+
} | undefined;
|
|
367
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
368
|
+
}>;
|
|
369
|
+
export type ToolOutputImage = z.infer<typeof ToolOutputImage>;
|
|
370
|
+
export declare const ToolOutputFileContent: z.ZodObject<{
|
|
371
|
+
/**
|
|
372
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
373
|
+
* specific fields.
|
|
374
|
+
*/
|
|
375
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
376
|
+
} & {
|
|
377
|
+
type: z.ZodLiteral<"file">;
|
|
378
|
+
/**
|
|
379
|
+
* File output reference. Provide either a string (data URL / base64), a data object (requires
|
|
380
|
+
* mediaType + filename), or an object pointing to an uploaded file/URL.
|
|
381
|
+
*/
|
|
382
|
+
file: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
383
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
384
|
+
mediaType: z.ZodString;
|
|
385
|
+
filename: z.ZodString;
|
|
386
|
+
}, "strip", z.ZodTypeAny, {
|
|
387
|
+
filename: string;
|
|
388
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
389
|
+
mediaType: string;
|
|
390
|
+
}, {
|
|
391
|
+
filename: string;
|
|
392
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
393
|
+
mediaType: string;
|
|
394
|
+
}>, z.ZodObject<{
|
|
395
|
+
url: z.ZodString;
|
|
396
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
397
|
+
}, "strip", z.ZodTypeAny, {
|
|
398
|
+
url: string;
|
|
399
|
+
filename?: string | undefined;
|
|
400
|
+
}, {
|
|
401
|
+
url: string;
|
|
402
|
+
filename?: string | undefined;
|
|
403
|
+
}>, z.ZodObject<{
|
|
404
|
+
id: z.ZodString;
|
|
405
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
406
|
+
}, "strip", z.ZodTypeAny, {
|
|
407
|
+
id: string;
|
|
408
|
+
filename?: string | undefined;
|
|
409
|
+
}, {
|
|
410
|
+
id: string;
|
|
411
|
+
filename?: string | undefined;
|
|
412
|
+
}>]>;
|
|
413
|
+
}, "strip", z.ZodTypeAny, {
|
|
414
|
+
type: "file";
|
|
415
|
+
file: string | {
|
|
416
|
+
filename: string;
|
|
417
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
418
|
+
mediaType: string;
|
|
419
|
+
} | {
|
|
420
|
+
url: string;
|
|
421
|
+
filename?: string | undefined;
|
|
422
|
+
} | {
|
|
423
|
+
id: string;
|
|
424
|
+
filename?: string | undefined;
|
|
425
|
+
};
|
|
426
|
+
providerData?: Record<string, any> | undefined;
|
|
427
|
+
}, {
|
|
428
|
+
type: "file";
|
|
429
|
+
file: string | {
|
|
430
|
+
filename: string;
|
|
431
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
432
|
+
mediaType: string;
|
|
433
|
+
} | {
|
|
434
|
+
url: string;
|
|
435
|
+
filename?: string | undefined;
|
|
436
|
+
} | {
|
|
437
|
+
id: string;
|
|
438
|
+
filename?: string | undefined;
|
|
439
|
+
};
|
|
315
440
|
providerData?: Record<string, any> | undefined;
|
|
316
441
|
}>;
|
|
442
|
+
export type ToolOutputFileContent = z.infer<typeof ToolOutputFileContent>;
|
|
317
443
|
export declare const ComputerToolOutput: z.ZodObject<{
|
|
318
444
|
/**
|
|
319
445
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -770,27 +896,35 @@ export declare const UserContent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
770
896
|
} & {
|
|
771
897
|
type: z.ZodLiteral<"input_image">;
|
|
772
898
|
/**
|
|
773
|
-
* The image input to the model. Could be a URL,
|
|
899
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
900
|
+
* previously uploaded OpenAI file.
|
|
774
901
|
*/
|
|
775
|
-
image: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
902
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
776
903
|
id: z.ZodString;
|
|
777
904
|
}, "strip", z.ZodTypeAny, {
|
|
778
905
|
id: string;
|
|
779
906
|
}, {
|
|
780
907
|
id: string;
|
|
781
|
-
}>]
|
|
908
|
+
}>]>>;
|
|
909
|
+
/**
|
|
910
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
911
|
+
* Future models may add new values, therefore this accepts any string.
|
|
912
|
+
*/
|
|
913
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
782
914
|
}, "strip", z.ZodTypeAny, {
|
|
783
915
|
type: "input_image";
|
|
784
|
-
image: string | {
|
|
785
|
-
id: string;
|
|
786
|
-
};
|
|
787
916
|
providerData?: Record<string, any> | undefined;
|
|
917
|
+
image?: string | {
|
|
918
|
+
id: string;
|
|
919
|
+
} | undefined;
|
|
920
|
+
detail?: string | undefined;
|
|
788
921
|
}, {
|
|
789
922
|
type: "input_image";
|
|
790
|
-
image: string | {
|
|
791
|
-
id: string;
|
|
792
|
-
};
|
|
793
923
|
providerData?: Record<string, any> | undefined;
|
|
924
|
+
image?: string | {
|
|
925
|
+
id: string;
|
|
926
|
+
} | undefined;
|
|
927
|
+
detail?: string | undefined;
|
|
794
928
|
}>, z.ZodObject<{
|
|
795
929
|
/**
|
|
796
930
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -800,9 +934,9 @@ export declare const UserContent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
800
934
|
} & {
|
|
801
935
|
type: z.ZodLiteral<"input_file">;
|
|
802
936
|
/**
|
|
803
|
-
* The file input to the model. Could be a URL,
|
|
937
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
804
938
|
*/
|
|
805
|
-
file: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
939
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
806
940
|
id: z.ZodString;
|
|
807
941
|
}, "strip", z.ZodTypeAny, {
|
|
808
942
|
id: string;
|
|
@@ -814,23 +948,29 @@ export declare const UserContent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
814
948
|
url: string;
|
|
815
949
|
}, {
|
|
816
950
|
url: string;
|
|
817
|
-
}>]
|
|
951
|
+
}>]>>;
|
|
952
|
+
/**
|
|
953
|
+
* Optional filename metadata when uploading file data inline.
|
|
954
|
+
*/
|
|
955
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
818
956
|
}, "strip", z.ZodTypeAny, {
|
|
819
957
|
type: "input_file";
|
|
820
|
-
|
|
958
|
+
providerData?: Record<string, any> | undefined;
|
|
959
|
+
file?: string | {
|
|
821
960
|
id: string;
|
|
822
961
|
} | {
|
|
823
962
|
url: string;
|
|
824
|
-
};
|
|
825
|
-
|
|
963
|
+
} | undefined;
|
|
964
|
+
filename?: string | undefined;
|
|
826
965
|
}, {
|
|
827
966
|
type: "input_file";
|
|
828
|
-
|
|
967
|
+
providerData?: Record<string, any> | undefined;
|
|
968
|
+
file?: string | {
|
|
829
969
|
id: string;
|
|
830
970
|
} | {
|
|
831
971
|
url: string;
|
|
832
|
-
};
|
|
833
|
-
|
|
972
|
+
} | undefined;
|
|
973
|
+
filename?: string | undefined;
|
|
834
974
|
}>, z.ZodObject<{
|
|
835
975
|
/**
|
|
836
976
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -929,27 +1069,35 @@ export declare const UserMessageItem: z.ZodObject<{
|
|
|
929
1069
|
} & {
|
|
930
1070
|
type: z.ZodLiteral<"input_image">;
|
|
931
1071
|
/**
|
|
932
|
-
* The image input to the model. Could be a URL,
|
|
1072
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
1073
|
+
* previously uploaded OpenAI file.
|
|
933
1074
|
*/
|
|
934
|
-
image: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1075
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
935
1076
|
id: z.ZodString;
|
|
936
1077
|
}, "strip", z.ZodTypeAny, {
|
|
937
1078
|
id: string;
|
|
938
1079
|
}, {
|
|
939
1080
|
id: string;
|
|
940
|
-
}>]
|
|
1081
|
+
}>]>>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
1084
|
+
* Future models may add new values, therefore this accepts any string.
|
|
1085
|
+
*/
|
|
1086
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
941
1087
|
}, "strip", z.ZodTypeAny, {
|
|
942
1088
|
type: "input_image";
|
|
943
|
-
image: string | {
|
|
944
|
-
id: string;
|
|
945
|
-
};
|
|
946
1089
|
providerData?: Record<string, any> | undefined;
|
|
1090
|
+
image?: string | {
|
|
1091
|
+
id: string;
|
|
1092
|
+
} | undefined;
|
|
1093
|
+
detail?: string | undefined;
|
|
947
1094
|
}, {
|
|
948
1095
|
type: "input_image";
|
|
949
|
-
image: string | {
|
|
950
|
-
id: string;
|
|
951
|
-
};
|
|
952
1096
|
providerData?: Record<string, any> | undefined;
|
|
1097
|
+
image?: string | {
|
|
1098
|
+
id: string;
|
|
1099
|
+
} | undefined;
|
|
1100
|
+
detail?: string | undefined;
|
|
953
1101
|
}>, z.ZodObject<{
|
|
954
1102
|
/**
|
|
955
1103
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -959,9 +1107,9 @@ export declare const UserMessageItem: z.ZodObject<{
|
|
|
959
1107
|
} & {
|
|
960
1108
|
type: z.ZodLiteral<"input_file">;
|
|
961
1109
|
/**
|
|
962
|
-
* The file input to the model. Could be a URL,
|
|
1110
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
963
1111
|
*/
|
|
964
|
-
file: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1112
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
965
1113
|
id: z.ZodString;
|
|
966
1114
|
}, "strip", z.ZodTypeAny, {
|
|
967
1115
|
id: string;
|
|
@@ -973,23 +1121,29 @@ export declare const UserMessageItem: z.ZodObject<{
|
|
|
973
1121
|
url: string;
|
|
974
1122
|
}, {
|
|
975
1123
|
url: string;
|
|
976
|
-
}>]
|
|
1124
|
+
}>]>>;
|
|
1125
|
+
/**
|
|
1126
|
+
* Optional filename metadata when uploading file data inline.
|
|
1127
|
+
*/
|
|
1128
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
977
1129
|
}, "strip", z.ZodTypeAny, {
|
|
978
1130
|
type: "input_file";
|
|
979
|
-
|
|
1131
|
+
providerData?: Record<string, any> | undefined;
|
|
1132
|
+
file?: string | {
|
|
980
1133
|
id: string;
|
|
981
1134
|
} | {
|
|
982
1135
|
url: string;
|
|
983
|
-
};
|
|
984
|
-
|
|
1136
|
+
} | undefined;
|
|
1137
|
+
filename?: string | undefined;
|
|
985
1138
|
}, {
|
|
986
1139
|
type: "input_file";
|
|
987
|
-
|
|
1140
|
+
providerData?: Record<string, any> | undefined;
|
|
1141
|
+
file?: string | {
|
|
988
1142
|
id: string;
|
|
989
1143
|
} | {
|
|
990
1144
|
url: string;
|
|
991
|
-
};
|
|
992
|
-
|
|
1145
|
+
} | undefined;
|
|
1146
|
+
filename?: string | undefined;
|
|
993
1147
|
}>, z.ZodObject<{
|
|
994
1148
|
/**
|
|
995
1149
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -1041,18 +1195,20 @@ export declare const UserMessageItem: z.ZodObject<{
|
|
|
1041
1195
|
providerData?: Record<string, any> | undefined;
|
|
1042
1196
|
} | {
|
|
1043
1197
|
type: "input_image";
|
|
1044
|
-
image: string | {
|
|
1045
|
-
id: string;
|
|
1046
|
-
};
|
|
1047
1198
|
providerData?: Record<string, any> | undefined;
|
|
1199
|
+
image?: string | {
|
|
1200
|
+
id: string;
|
|
1201
|
+
} | undefined;
|
|
1202
|
+
detail?: string | undefined;
|
|
1048
1203
|
} | {
|
|
1049
1204
|
type: "input_file";
|
|
1050
|
-
|
|
1205
|
+
providerData?: Record<string, any> | undefined;
|
|
1206
|
+
file?: string | {
|
|
1051
1207
|
id: string;
|
|
1052
1208
|
} | {
|
|
1053
1209
|
url: string;
|
|
1054
|
-
};
|
|
1055
|
-
|
|
1210
|
+
} | undefined;
|
|
1211
|
+
filename?: string | undefined;
|
|
1056
1212
|
} | {
|
|
1057
1213
|
type: "audio";
|
|
1058
1214
|
audio: string | {
|
|
@@ -1073,18 +1229,20 @@ export declare const UserMessageItem: z.ZodObject<{
|
|
|
1073
1229
|
providerData?: Record<string, any> | undefined;
|
|
1074
1230
|
} | {
|
|
1075
1231
|
type: "input_image";
|
|
1076
|
-
image: string | {
|
|
1077
|
-
id: string;
|
|
1078
|
-
};
|
|
1079
1232
|
providerData?: Record<string, any> | undefined;
|
|
1233
|
+
image?: string | {
|
|
1234
|
+
id: string;
|
|
1235
|
+
} | undefined;
|
|
1236
|
+
detail?: string | undefined;
|
|
1080
1237
|
} | {
|
|
1081
1238
|
type: "input_file";
|
|
1082
|
-
|
|
1239
|
+
providerData?: Record<string, any> | undefined;
|
|
1240
|
+
file?: string | {
|
|
1083
1241
|
id: string;
|
|
1084
1242
|
} | {
|
|
1085
1243
|
url: string;
|
|
1086
|
-
};
|
|
1087
|
-
|
|
1244
|
+
} | undefined;
|
|
1245
|
+
filename?: string | undefined;
|
|
1088
1246
|
} | {
|
|
1089
1247
|
type: "audio";
|
|
1090
1248
|
audio: string | {
|
|
@@ -1417,27 +1575,35 @@ export declare const MessageItem: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
|
1417
1575
|
} & {
|
|
1418
1576
|
type: z.ZodLiteral<"input_image">;
|
|
1419
1577
|
/**
|
|
1420
|
-
* The image input to the model. Could be a URL,
|
|
1578
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
1579
|
+
* previously uploaded OpenAI file.
|
|
1421
1580
|
*/
|
|
1422
|
-
image: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1581
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1423
1582
|
id: z.ZodString;
|
|
1424
1583
|
}, "strip", z.ZodTypeAny, {
|
|
1425
1584
|
id: string;
|
|
1426
1585
|
}, {
|
|
1427
1586
|
id: string;
|
|
1428
|
-
}>]
|
|
1587
|
+
}>]>>;
|
|
1588
|
+
/**
|
|
1589
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
1590
|
+
* Future models may add new values, therefore this accepts any string.
|
|
1591
|
+
*/
|
|
1592
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1429
1593
|
}, "strip", z.ZodTypeAny, {
|
|
1430
1594
|
type: "input_image";
|
|
1431
|
-
image: string | {
|
|
1432
|
-
id: string;
|
|
1433
|
-
};
|
|
1434
1595
|
providerData?: Record<string, any> | undefined;
|
|
1596
|
+
image?: string | {
|
|
1597
|
+
id: string;
|
|
1598
|
+
} | undefined;
|
|
1599
|
+
detail?: string | undefined;
|
|
1435
1600
|
}, {
|
|
1436
1601
|
type: "input_image";
|
|
1437
|
-
image: string | {
|
|
1438
|
-
id: string;
|
|
1439
|
-
};
|
|
1440
1602
|
providerData?: Record<string, any> | undefined;
|
|
1603
|
+
image?: string | {
|
|
1604
|
+
id: string;
|
|
1605
|
+
} | undefined;
|
|
1606
|
+
detail?: string | undefined;
|
|
1441
1607
|
}>, z.ZodObject<{
|
|
1442
1608
|
/**
|
|
1443
1609
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -1447,9 +1613,9 @@ export declare const MessageItem: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
|
1447
1613
|
} & {
|
|
1448
1614
|
type: z.ZodLiteral<"input_file">;
|
|
1449
1615
|
/**
|
|
1450
|
-
* The file input to the model. Could be a URL,
|
|
1616
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
1451
1617
|
*/
|
|
1452
|
-
file: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1618
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1453
1619
|
id: z.ZodString;
|
|
1454
1620
|
}, "strip", z.ZodTypeAny, {
|
|
1455
1621
|
id: string;
|
|
@@ -1461,23 +1627,29 @@ export declare const MessageItem: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
|
1461
1627
|
url: string;
|
|
1462
1628
|
}, {
|
|
1463
1629
|
url: string;
|
|
1464
|
-
}>]
|
|
1630
|
+
}>]>>;
|
|
1631
|
+
/**
|
|
1632
|
+
* Optional filename metadata when uploading file data inline.
|
|
1633
|
+
*/
|
|
1634
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1465
1635
|
}, "strip", z.ZodTypeAny, {
|
|
1466
1636
|
type: "input_file";
|
|
1467
|
-
|
|
1637
|
+
providerData?: Record<string, any> | undefined;
|
|
1638
|
+
file?: string | {
|
|
1468
1639
|
id: string;
|
|
1469
1640
|
} | {
|
|
1470
1641
|
url: string;
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1642
|
+
} | undefined;
|
|
1643
|
+
filename?: string | undefined;
|
|
1473
1644
|
}, {
|
|
1474
1645
|
type: "input_file";
|
|
1475
|
-
|
|
1646
|
+
providerData?: Record<string, any> | undefined;
|
|
1647
|
+
file?: string | {
|
|
1476
1648
|
id: string;
|
|
1477
1649
|
} | {
|
|
1478
1650
|
url: string;
|
|
1479
|
-
};
|
|
1480
|
-
|
|
1651
|
+
} | undefined;
|
|
1652
|
+
filename?: string | undefined;
|
|
1481
1653
|
}>, z.ZodObject<{
|
|
1482
1654
|
/**
|
|
1483
1655
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -1529,18 +1701,20 @@ export declare const MessageItem: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
|
1529
1701
|
providerData?: Record<string, any> | undefined;
|
|
1530
1702
|
} | {
|
|
1531
1703
|
type: "input_image";
|
|
1532
|
-
image: string | {
|
|
1533
|
-
id: string;
|
|
1534
|
-
};
|
|
1535
1704
|
providerData?: Record<string, any> | undefined;
|
|
1705
|
+
image?: string | {
|
|
1706
|
+
id: string;
|
|
1707
|
+
} | undefined;
|
|
1708
|
+
detail?: string | undefined;
|
|
1536
1709
|
} | {
|
|
1537
1710
|
type: "input_file";
|
|
1538
|
-
|
|
1711
|
+
providerData?: Record<string, any> | undefined;
|
|
1712
|
+
file?: string | {
|
|
1539
1713
|
id: string;
|
|
1540
1714
|
} | {
|
|
1541
1715
|
url: string;
|
|
1542
|
-
};
|
|
1543
|
-
|
|
1716
|
+
} | undefined;
|
|
1717
|
+
filename?: string | undefined;
|
|
1544
1718
|
} | {
|
|
1545
1719
|
type: "audio";
|
|
1546
1720
|
audio: string | {
|
|
@@ -1561,18 +1735,20 @@ export declare const MessageItem: z.ZodDiscriminatedUnion<"role", [z.ZodObject<{
|
|
|
1561
1735
|
providerData?: Record<string, any> | undefined;
|
|
1562
1736
|
} | {
|
|
1563
1737
|
type: "input_image";
|
|
1564
|
-
image: string | {
|
|
1565
|
-
id: string;
|
|
1566
|
-
};
|
|
1567
1738
|
providerData?: Record<string, any> | undefined;
|
|
1739
|
+
image?: string | {
|
|
1740
|
+
id: string;
|
|
1741
|
+
} | undefined;
|
|
1742
|
+
detail?: string | undefined;
|
|
1568
1743
|
} | {
|
|
1569
1744
|
type: "input_file";
|
|
1570
|
-
|
|
1745
|
+
providerData?: Record<string, any> | undefined;
|
|
1746
|
+
file?: string | {
|
|
1571
1747
|
id: string;
|
|
1572
1748
|
} | {
|
|
1573
1749
|
url: string;
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1750
|
+
} | undefined;
|
|
1751
|
+
filename?: string | undefined;
|
|
1576
1752
|
} | {
|
|
1577
1753
|
type: "audio";
|
|
1578
1754
|
audio: string | {
|
|
@@ -1683,96 +1859,611 @@ export declare const FunctionCallItem: z.ZodObject<{
|
|
|
1683
1859
|
id?: string | undefined;
|
|
1684
1860
|
}>;
|
|
1685
1861
|
export type FunctionCallItem = z.infer<typeof FunctionCallItem>;
|
|
1686
|
-
export declare const
|
|
1862
|
+
export declare const ToolCallOutputContent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1687
1863
|
/**
|
|
1688
1864
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
1689
1865
|
* specific fields.
|
|
1690
1866
|
*/
|
|
1691
1867
|
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1692
1868
|
} & {
|
|
1869
|
+
type: z.ZodLiteral<"text">;
|
|
1693
1870
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
* requires this field, it will be validated on the model level.
|
|
1871
|
+
* The text output from the model.
|
|
1696
1872
|
*/
|
|
1697
|
-
|
|
1873
|
+
text: z.ZodString;
|
|
1874
|
+
}, "strip", z.ZodTypeAny, {
|
|
1875
|
+
type: "text";
|
|
1876
|
+
text: string;
|
|
1877
|
+
providerData?: Record<string, any> | undefined;
|
|
1878
|
+
}, {
|
|
1879
|
+
type: "text";
|
|
1880
|
+
text: string;
|
|
1881
|
+
providerData?: Record<string, any> | undefined;
|
|
1882
|
+
}>, z.ZodObject<{
|
|
1883
|
+
/**
|
|
1884
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
1885
|
+
* specific fields.
|
|
1886
|
+
*/
|
|
1887
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1698
1888
|
} & {
|
|
1699
|
-
type: z.ZodLiteral<"
|
|
1889
|
+
type: z.ZodLiteral<"image">;
|
|
1700
1890
|
/**
|
|
1701
|
-
*
|
|
1891
|
+
* Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
|
|
1892
|
+
* object describing the data/url/fileId source.
|
|
1702
1893
|
*/
|
|
1703
|
-
|
|
1894
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
1895
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
1896
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
1897
|
+
}, "strip", z.ZodTypeAny, {
|
|
1898
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1899
|
+
mediaType?: string | undefined;
|
|
1900
|
+
}, {
|
|
1901
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1902
|
+
mediaType?: string | undefined;
|
|
1903
|
+
}>, z.ZodObject<{
|
|
1904
|
+
url: z.ZodString;
|
|
1905
|
+
}, "strip", z.ZodTypeAny, {
|
|
1906
|
+
url: string;
|
|
1907
|
+
}, {
|
|
1908
|
+
url: string;
|
|
1909
|
+
}>, z.ZodObject<{
|
|
1910
|
+
fileId: z.ZodString;
|
|
1911
|
+
}, "strip", z.ZodTypeAny, {
|
|
1912
|
+
fileId: string;
|
|
1913
|
+
}, {
|
|
1914
|
+
fileId: string;
|
|
1915
|
+
}>]>]>>;
|
|
1704
1916
|
/**
|
|
1705
|
-
*
|
|
1917
|
+
* Controls the requested level of detail for vision models.
|
|
1918
|
+
* Use a string to avoid constraining future model capabilities.
|
|
1706
1919
|
*/
|
|
1707
|
-
|
|
1920
|
+
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
|
|
1921
|
+
}, "strip", z.ZodTypeAny, {
|
|
1922
|
+
type: "image";
|
|
1923
|
+
providerData?: Record<string, any> | undefined;
|
|
1924
|
+
image?: string | {
|
|
1925
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1926
|
+
mediaType?: string | undefined;
|
|
1927
|
+
} | {
|
|
1928
|
+
url: string;
|
|
1929
|
+
} | {
|
|
1930
|
+
fileId: string;
|
|
1931
|
+
} | undefined;
|
|
1932
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
1933
|
+
}, {
|
|
1934
|
+
type: "image";
|
|
1935
|
+
providerData?: Record<string, any> | undefined;
|
|
1936
|
+
image?: string | {
|
|
1937
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1938
|
+
mediaType?: string | undefined;
|
|
1939
|
+
} | {
|
|
1940
|
+
url: string;
|
|
1941
|
+
} | {
|
|
1942
|
+
fileId: string;
|
|
1943
|
+
} | undefined;
|
|
1944
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
1945
|
+
}>, z.ZodObject<{
|
|
1708
1946
|
/**
|
|
1709
|
-
*
|
|
1947
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
1948
|
+
* specific fields.
|
|
1710
1949
|
*/
|
|
1711
|
-
|
|
1950
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1951
|
+
} & {
|
|
1952
|
+
type: z.ZodLiteral<"file">;
|
|
1712
1953
|
/**
|
|
1713
|
-
*
|
|
1954
|
+
* File output reference. Provide either a string (data URL / base64), a data object (requires
|
|
1955
|
+
* mediaType + filename), or an object pointing to an uploaded file/URL.
|
|
1714
1956
|
*/
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
*/
|
|
1720
|
-
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1721
|
-
} & {
|
|
1722
|
-
type: z.ZodLiteral<"text">;
|
|
1723
|
-
/**
|
|
1724
|
-
* The text output from the model.
|
|
1725
|
-
*/
|
|
1726
|
-
text: z.ZodString;
|
|
1957
|
+
file: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
1958
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
1959
|
+
mediaType: z.ZodString;
|
|
1960
|
+
filename: z.ZodString;
|
|
1727
1961
|
}, "strip", z.ZodTypeAny, {
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1962
|
+
filename: string;
|
|
1963
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1964
|
+
mediaType: string;
|
|
1731
1965
|
}, {
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1966
|
+
filename: string;
|
|
1967
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1968
|
+
mediaType: string;
|
|
1735
1969
|
}>, z.ZodObject<{
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1970
|
+
url: z.ZodString;
|
|
1971
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
}, "strip", z.ZodTypeAny, {
|
|
1973
|
+
url: string;
|
|
1974
|
+
filename?: string | undefined;
|
|
1975
|
+
}, {
|
|
1976
|
+
url: string;
|
|
1977
|
+
filename?: string | undefined;
|
|
1978
|
+
}>, z.ZodObject<{
|
|
1979
|
+
id: z.ZodString;
|
|
1980
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1981
|
+
}, "strip", z.ZodTypeAny, {
|
|
1982
|
+
id: string;
|
|
1983
|
+
filename?: string | undefined;
|
|
1984
|
+
}, {
|
|
1985
|
+
id: string;
|
|
1986
|
+
filename?: string | undefined;
|
|
1987
|
+
}>]>;
|
|
1988
|
+
}, "strip", z.ZodTypeAny, {
|
|
1989
|
+
type: "file";
|
|
1990
|
+
file: string | {
|
|
1991
|
+
filename: string;
|
|
1992
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
1993
|
+
mediaType: string;
|
|
1994
|
+
} | {
|
|
1995
|
+
url: string;
|
|
1996
|
+
filename?: string | undefined;
|
|
1997
|
+
} | {
|
|
1998
|
+
id: string;
|
|
1999
|
+
filename?: string | undefined;
|
|
2000
|
+
};
|
|
2001
|
+
providerData?: Record<string, any> | undefined;
|
|
2002
|
+
}, {
|
|
2003
|
+
type: "file";
|
|
2004
|
+
file: string | {
|
|
2005
|
+
filename: string;
|
|
2006
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2007
|
+
mediaType: string;
|
|
2008
|
+
} | {
|
|
2009
|
+
url: string;
|
|
2010
|
+
filename?: string | undefined;
|
|
2011
|
+
} | {
|
|
2012
|
+
id: string;
|
|
2013
|
+
filename?: string | undefined;
|
|
2014
|
+
};
|
|
2015
|
+
providerData?: Record<string, any> | undefined;
|
|
2016
|
+
}>]>;
|
|
2017
|
+
export type ToolCallOutputContent = z.infer<typeof ToolCallOutputContent>;
|
|
2018
|
+
export declare const ToolCallStructuredOutput: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2019
|
+
/**
|
|
2020
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2021
|
+
* specific fields.
|
|
2022
|
+
*/
|
|
2023
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2024
|
+
} & {
|
|
2025
|
+
type: z.ZodLiteral<"input_text">;
|
|
2026
|
+
/**
|
|
2027
|
+
* A text input for example a message from a user
|
|
2028
|
+
*/
|
|
2029
|
+
text: z.ZodString;
|
|
2030
|
+
}, "strip", z.ZodTypeAny, {
|
|
2031
|
+
type: "input_text";
|
|
2032
|
+
text: string;
|
|
2033
|
+
providerData?: Record<string, any> | undefined;
|
|
2034
|
+
}, {
|
|
2035
|
+
type: "input_text";
|
|
2036
|
+
text: string;
|
|
2037
|
+
providerData?: Record<string, any> | undefined;
|
|
2038
|
+
}>, z.ZodObject<{
|
|
2039
|
+
/**
|
|
2040
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2041
|
+
* specific fields.
|
|
2042
|
+
*/
|
|
2043
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2044
|
+
} & {
|
|
2045
|
+
type: z.ZodLiteral<"input_image">;
|
|
2046
|
+
/**
|
|
2047
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
2048
|
+
* previously uploaded OpenAI file.
|
|
2049
|
+
*/
|
|
2050
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2051
|
+
id: z.ZodString;
|
|
2052
|
+
}, "strip", z.ZodTypeAny, {
|
|
2053
|
+
id: string;
|
|
2054
|
+
}, {
|
|
2055
|
+
id: string;
|
|
2056
|
+
}>]>>;
|
|
2057
|
+
/**
|
|
2058
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
2059
|
+
* Future models may add new values, therefore this accepts any string.
|
|
2060
|
+
*/
|
|
2061
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2062
|
+
}, "strip", z.ZodTypeAny, {
|
|
2063
|
+
type: "input_image";
|
|
2064
|
+
providerData?: Record<string, any> | undefined;
|
|
2065
|
+
image?: string | {
|
|
2066
|
+
id: string;
|
|
2067
|
+
} | undefined;
|
|
2068
|
+
detail?: string | undefined;
|
|
2069
|
+
}, {
|
|
2070
|
+
type: "input_image";
|
|
2071
|
+
providerData?: Record<string, any> | undefined;
|
|
2072
|
+
image?: string | {
|
|
2073
|
+
id: string;
|
|
2074
|
+
} | undefined;
|
|
2075
|
+
detail?: string | undefined;
|
|
2076
|
+
}>, z.ZodObject<{
|
|
2077
|
+
/**
|
|
2078
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2079
|
+
* specific fields.
|
|
2080
|
+
*/
|
|
2081
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2082
|
+
} & {
|
|
2083
|
+
type: z.ZodLiteral<"input_file">;
|
|
2084
|
+
/**
|
|
2085
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
2086
|
+
*/
|
|
2087
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2088
|
+
id: z.ZodString;
|
|
2089
|
+
}, "strip", z.ZodTypeAny, {
|
|
2090
|
+
id: string;
|
|
2091
|
+
}, {
|
|
2092
|
+
id: string;
|
|
2093
|
+
}>]>, z.ZodObject<{
|
|
2094
|
+
url: z.ZodString;
|
|
2095
|
+
}, "strip", z.ZodTypeAny, {
|
|
2096
|
+
url: string;
|
|
2097
|
+
}, {
|
|
2098
|
+
url: string;
|
|
2099
|
+
}>]>>;
|
|
2100
|
+
/**
|
|
2101
|
+
* Optional filename metadata when uploading file data inline.
|
|
2102
|
+
*/
|
|
2103
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
2104
|
+
}, "strip", z.ZodTypeAny, {
|
|
2105
|
+
type: "input_file";
|
|
2106
|
+
providerData?: Record<string, any> | undefined;
|
|
2107
|
+
file?: string | {
|
|
2108
|
+
id: string;
|
|
2109
|
+
} | {
|
|
2110
|
+
url: string;
|
|
2111
|
+
} | undefined;
|
|
2112
|
+
filename?: string | undefined;
|
|
2113
|
+
}, {
|
|
2114
|
+
type: "input_file";
|
|
2115
|
+
providerData?: Record<string, any> | undefined;
|
|
2116
|
+
file?: string | {
|
|
2117
|
+
id: string;
|
|
2118
|
+
} | {
|
|
2119
|
+
url: string;
|
|
2120
|
+
} | undefined;
|
|
2121
|
+
filename?: string | undefined;
|
|
2122
|
+
}>]>;
|
|
2123
|
+
export type ToolCallStructuredOutput = z.infer<typeof ToolCallStructuredOutput>;
|
|
2124
|
+
export declare const FunctionCallResultItem: z.ZodObject<{
|
|
2125
|
+
/**
|
|
2126
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2127
|
+
* specific fields.
|
|
2128
|
+
*/
|
|
2129
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2130
|
+
} & {
|
|
2131
|
+
/**
|
|
2132
|
+
* An ID to identify the item. This is optional by default. If a model provider absolutely
|
|
2133
|
+
* requires this field, it will be validated on the model level.
|
|
2134
|
+
*/
|
|
2135
|
+
id: z.ZodOptional<z.ZodString>;
|
|
2136
|
+
} & {
|
|
2137
|
+
type: z.ZodLiteral<"function_call_result">;
|
|
2138
|
+
/**
|
|
2139
|
+
* The name of the tool that was called
|
|
2140
|
+
*/
|
|
2141
|
+
name: z.ZodString;
|
|
2142
|
+
/**
|
|
2143
|
+
* The ID of the tool call. Required to match up the respective tool call result.
|
|
2144
|
+
*/
|
|
2145
|
+
callId: z.ZodString;
|
|
2146
|
+
/**
|
|
2147
|
+
* The status of the tool call.
|
|
2148
|
+
*/
|
|
2149
|
+
status: z.ZodEnum<["in_progress", "completed", "incomplete"]>;
|
|
2150
|
+
/**
|
|
2151
|
+
* The output of the tool call.
|
|
2152
|
+
*/
|
|
2153
|
+
output: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2154
|
+
/**
|
|
2155
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2156
|
+
* specific fields.
|
|
2157
|
+
*/
|
|
2158
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2159
|
+
} & {
|
|
2160
|
+
type: z.ZodLiteral<"text">;
|
|
2161
|
+
/**
|
|
2162
|
+
* The text output from the model.
|
|
2163
|
+
*/
|
|
2164
|
+
text: z.ZodString;
|
|
2165
|
+
}, "strip", z.ZodTypeAny, {
|
|
2166
|
+
type: "text";
|
|
2167
|
+
text: string;
|
|
2168
|
+
providerData?: Record<string, any> | undefined;
|
|
2169
|
+
}, {
|
|
2170
|
+
type: "text";
|
|
2171
|
+
text: string;
|
|
2172
|
+
providerData?: Record<string, any> | undefined;
|
|
2173
|
+
}>, z.ZodObject<{
|
|
2174
|
+
/**
|
|
2175
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2176
|
+
* specific fields.
|
|
2177
|
+
*/
|
|
2178
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1741
2179
|
} & {
|
|
1742
2180
|
type: z.ZodLiteral<"image">;
|
|
1743
2181
|
/**
|
|
1744
|
-
*
|
|
2182
|
+
* Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
|
|
2183
|
+
* object describing the data/url/fileId source.
|
|
1745
2184
|
*/
|
|
1746
|
-
|
|
2185
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
2186
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
2187
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
2188
|
+
}, "strip", z.ZodTypeAny, {
|
|
2189
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2190
|
+
mediaType?: string | undefined;
|
|
2191
|
+
}, {
|
|
2192
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2193
|
+
mediaType?: string | undefined;
|
|
2194
|
+
}>, z.ZodObject<{
|
|
2195
|
+
url: z.ZodString;
|
|
2196
|
+
}, "strip", z.ZodTypeAny, {
|
|
2197
|
+
url: string;
|
|
2198
|
+
}, {
|
|
2199
|
+
url: string;
|
|
2200
|
+
}>, z.ZodObject<{
|
|
2201
|
+
fileId: z.ZodString;
|
|
2202
|
+
}, "strip", z.ZodTypeAny, {
|
|
2203
|
+
fileId: string;
|
|
2204
|
+
}, {
|
|
2205
|
+
fileId: string;
|
|
2206
|
+
}>]>]>>;
|
|
1747
2207
|
/**
|
|
1748
|
-
*
|
|
2208
|
+
* Controls the requested level of detail for vision models.
|
|
2209
|
+
* Use a string to avoid constraining future model capabilities.
|
|
1749
2210
|
*/
|
|
1750
|
-
|
|
2211
|
+
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
|
|
1751
2212
|
}, "strip", z.ZodTypeAny, {
|
|
1752
2213
|
type: "image";
|
|
1753
|
-
data: string;
|
|
1754
|
-
mediaType: string;
|
|
1755
2214
|
providerData?: Record<string, any> | undefined;
|
|
2215
|
+
image?: string | {
|
|
2216
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2217
|
+
mediaType?: string | undefined;
|
|
2218
|
+
} | {
|
|
2219
|
+
url: string;
|
|
2220
|
+
} | {
|
|
2221
|
+
fileId: string;
|
|
2222
|
+
} | undefined;
|
|
2223
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
1756
2224
|
}, {
|
|
1757
2225
|
type: "image";
|
|
1758
|
-
data: string;
|
|
1759
|
-
mediaType: string;
|
|
1760
2226
|
providerData?: Record<string, any> | undefined;
|
|
1761
|
-
|
|
2227
|
+
image?: string | {
|
|
2228
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2229
|
+
mediaType?: string | undefined;
|
|
2230
|
+
} | {
|
|
2231
|
+
url: string;
|
|
2232
|
+
} | {
|
|
2233
|
+
fileId: string;
|
|
2234
|
+
} | undefined;
|
|
2235
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
2236
|
+
}>, z.ZodObject<{
|
|
2237
|
+
/**
|
|
2238
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2239
|
+
* specific fields.
|
|
2240
|
+
*/
|
|
2241
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2242
|
+
} & {
|
|
2243
|
+
type: z.ZodLiteral<"file">;
|
|
2244
|
+
/**
|
|
2245
|
+
* File output reference. Provide either a string (data URL / base64), a data object (requires
|
|
2246
|
+
* mediaType + filename), or an object pointing to an uploaded file/URL.
|
|
2247
|
+
*/
|
|
2248
|
+
file: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2249
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
2250
|
+
mediaType: z.ZodString;
|
|
2251
|
+
filename: z.ZodString;
|
|
2252
|
+
}, "strip", z.ZodTypeAny, {
|
|
2253
|
+
filename: string;
|
|
2254
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2255
|
+
mediaType: string;
|
|
2256
|
+
}, {
|
|
2257
|
+
filename: string;
|
|
2258
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2259
|
+
mediaType: string;
|
|
2260
|
+
}>, z.ZodObject<{
|
|
2261
|
+
url: z.ZodString;
|
|
2262
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
2263
|
+
}, "strip", z.ZodTypeAny, {
|
|
2264
|
+
url: string;
|
|
2265
|
+
filename?: string | undefined;
|
|
2266
|
+
}, {
|
|
2267
|
+
url: string;
|
|
2268
|
+
filename?: string | undefined;
|
|
2269
|
+
}>, z.ZodObject<{
|
|
2270
|
+
id: z.ZodString;
|
|
2271
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
2272
|
+
}, "strip", z.ZodTypeAny, {
|
|
2273
|
+
id: string;
|
|
2274
|
+
filename?: string | undefined;
|
|
2275
|
+
}, {
|
|
2276
|
+
id: string;
|
|
2277
|
+
filename?: string | undefined;
|
|
2278
|
+
}>]>;
|
|
2279
|
+
}, "strip", z.ZodTypeAny, {
|
|
2280
|
+
type: "file";
|
|
2281
|
+
file: string | {
|
|
2282
|
+
filename: string;
|
|
2283
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2284
|
+
mediaType: string;
|
|
2285
|
+
} | {
|
|
2286
|
+
url: string;
|
|
2287
|
+
filename?: string | undefined;
|
|
2288
|
+
} | {
|
|
2289
|
+
id: string;
|
|
2290
|
+
filename?: string | undefined;
|
|
2291
|
+
};
|
|
2292
|
+
providerData?: Record<string, any> | undefined;
|
|
2293
|
+
}, {
|
|
2294
|
+
type: "file";
|
|
2295
|
+
file: string | {
|
|
2296
|
+
filename: string;
|
|
2297
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2298
|
+
mediaType: string;
|
|
2299
|
+
} | {
|
|
2300
|
+
url: string;
|
|
2301
|
+
filename?: string | undefined;
|
|
2302
|
+
} | {
|
|
2303
|
+
id: string;
|
|
2304
|
+
filename?: string | undefined;
|
|
2305
|
+
};
|
|
2306
|
+
providerData?: Record<string, any> | undefined;
|
|
2307
|
+
}>]>, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2308
|
+
/**
|
|
2309
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2310
|
+
* specific fields.
|
|
2311
|
+
*/
|
|
2312
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2313
|
+
} & {
|
|
2314
|
+
type: z.ZodLiteral<"input_text">;
|
|
2315
|
+
/**
|
|
2316
|
+
* A text input for example a message from a user
|
|
2317
|
+
*/
|
|
2318
|
+
text: z.ZodString;
|
|
2319
|
+
}, "strip", z.ZodTypeAny, {
|
|
2320
|
+
type: "input_text";
|
|
2321
|
+
text: string;
|
|
2322
|
+
providerData?: Record<string, any> | undefined;
|
|
2323
|
+
}, {
|
|
2324
|
+
type: "input_text";
|
|
2325
|
+
text: string;
|
|
2326
|
+
providerData?: Record<string, any> | undefined;
|
|
2327
|
+
}>, z.ZodObject<{
|
|
2328
|
+
/**
|
|
2329
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2330
|
+
* specific fields.
|
|
2331
|
+
*/
|
|
2332
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2333
|
+
} & {
|
|
2334
|
+
type: z.ZodLiteral<"input_image">;
|
|
2335
|
+
/**
|
|
2336
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
2337
|
+
* previously uploaded OpenAI file.
|
|
2338
|
+
*/
|
|
2339
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2340
|
+
id: z.ZodString;
|
|
2341
|
+
}, "strip", z.ZodTypeAny, {
|
|
2342
|
+
id: string;
|
|
2343
|
+
}, {
|
|
2344
|
+
id: string;
|
|
2345
|
+
}>]>>;
|
|
2346
|
+
/**
|
|
2347
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
2348
|
+
* Future models may add new values, therefore this accepts any string.
|
|
2349
|
+
*/
|
|
2350
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
2351
|
+
}, "strip", z.ZodTypeAny, {
|
|
2352
|
+
type: "input_image";
|
|
2353
|
+
providerData?: Record<string, any> | undefined;
|
|
2354
|
+
image?: string | {
|
|
2355
|
+
id: string;
|
|
2356
|
+
} | undefined;
|
|
2357
|
+
detail?: string | undefined;
|
|
2358
|
+
}, {
|
|
2359
|
+
type: "input_image";
|
|
2360
|
+
providerData?: Record<string, any> | undefined;
|
|
2361
|
+
image?: string | {
|
|
2362
|
+
id: string;
|
|
2363
|
+
} | undefined;
|
|
2364
|
+
detail?: string | undefined;
|
|
2365
|
+
}>, z.ZodObject<{
|
|
2366
|
+
/**
|
|
2367
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
2368
|
+
* specific fields.
|
|
2369
|
+
*/
|
|
2370
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2371
|
+
} & {
|
|
2372
|
+
type: z.ZodLiteral<"input_file">;
|
|
2373
|
+
/**
|
|
2374
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
2375
|
+
*/
|
|
2376
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2377
|
+
id: z.ZodString;
|
|
2378
|
+
}, "strip", z.ZodTypeAny, {
|
|
2379
|
+
id: string;
|
|
2380
|
+
}, {
|
|
2381
|
+
id: string;
|
|
2382
|
+
}>]>, z.ZodObject<{
|
|
2383
|
+
url: z.ZodString;
|
|
2384
|
+
}, "strip", z.ZodTypeAny, {
|
|
2385
|
+
url: string;
|
|
2386
|
+
}, {
|
|
2387
|
+
url: string;
|
|
2388
|
+
}>]>>;
|
|
2389
|
+
/**
|
|
2390
|
+
* Optional filename metadata when uploading file data inline.
|
|
2391
|
+
*/
|
|
2392
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
2393
|
+
}, "strip", z.ZodTypeAny, {
|
|
2394
|
+
type: "input_file";
|
|
2395
|
+
providerData?: Record<string, any> | undefined;
|
|
2396
|
+
file?: string | {
|
|
2397
|
+
id: string;
|
|
2398
|
+
} | {
|
|
2399
|
+
url: string;
|
|
2400
|
+
} | undefined;
|
|
2401
|
+
filename?: string | undefined;
|
|
2402
|
+
}, {
|
|
2403
|
+
type: "input_file";
|
|
2404
|
+
providerData?: Record<string, any> | undefined;
|
|
2405
|
+
file?: string | {
|
|
2406
|
+
id: string;
|
|
2407
|
+
} | {
|
|
2408
|
+
url: string;
|
|
2409
|
+
} | undefined;
|
|
2410
|
+
filename?: string | undefined;
|
|
2411
|
+
}>]>, "many">]>;
|
|
1762
2412
|
}, "strip", z.ZodTypeAny, {
|
|
1763
2413
|
type: "function_call_result";
|
|
1764
2414
|
status: "in_progress" | "completed" | "incomplete";
|
|
1765
2415
|
name: string;
|
|
1766
|
-
output: {
|
|
2416
|
+
output: string | {
|
|
1767
2417
|
type: "text";
|
|
1768
2418
|
text: string;
|
|
1769
2419
|
providerData?: Record<string, any> | undefined;
|
|
1770
2420
|
} | {
|
|
1771
2421
|
type: "image";
|
|
1772
|
-
data: string;
|
|
1773
|
-
mediaType: string;
|
|
1774
2422
|
providerData?: Record<string, any> | undefined;
|
|
1775
|
-
|
|
2423
|
+
image?: string | {
|
|
2424
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2425
|
+
mediaType?: string | undefined;
|
|
2426
|
+
} | {
|
|
2427
|
+
url: string;
|
|
2428
|
+
} | {
|
|
2429
|
+
fileId: string;
|
|
2430
|
+
} | undefined;
|
|
2431
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
2432
|
+
} | {
|
|
2433
|
+
type: "file";
|
|
2434
|
+
file: string | {
|
|
2435
|
+
filename: string;
|
|
2436
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2437
|
+
mediaType: string;
|
|
2438
|
+
} | {
|
|
2439
|
+
url: string;
|
|
2440
|
+
filename?: string | undefined;
|
|
2441
|
+
} | {
|
|
2442
|
+
id: string;
|
|
2443
|
+
filename?: string | undefined;
|
|
2444
|
+
};
|
|
2445
|
+
providerData?: Record<string, any> | undefined;
|
|
2446
|
+
} | ({
|
|
2447
|
+
type: "input_text";
|
|
2448
|
+
text: string;
|
|
2449
|
+
providerData?: Record<string, any> | undefined;
|
|
2450
|
+
} | {
|
|
2451
|
+
type: "input_image";
|
|
2452
|
+
providerData?: Record<string, any> | undefined;
|
|
2453
|
+
image?: string | {
|
|
2454
|
+
id: string;
|
|
2455
|
+
} | undefined;
|
|
2456
|
+
detail?: string | undefined;
|
|
2457
|
+
} | {
|
|
2458
|
+
type: "input_file";
|
|
2459
|
+
providerData?: Record<string, any> | undefined;
|
|
2460
|
+
file?: string | {
|
|
2461
|
+
id: string;
|
|
2462
|
+
} | {
|
|
2463
|
+
url: string;
|
|
2464
|
+
} | undefined;
|
|
2465
|
+
filename?: string | undefined;
|
|
2466
|
+
})[];
|
|
1776
2467
|
callId: string;
|
|
1777
2468
|
providerData?: Record<string, any> | undefined;
|
|
1778
2469
|
id?: string | undefined;
|
|
@@ -1780,16 +2471,57 @@ export declare const FunctionCallResultItem: z.ZodObject<{
|
|
|
1780
2471
|
type: "function_call_result";
|
|
1781
2472
|
status: "in_progress" | "completed" | "incomplete";
|
|
1782
2473
|
name: string;
|
|
1783
|
-
output: {
|
|
2474
|
+
output: string | {
|
|
1784
2475
|
type: "text";
|
|
1785
2476
|
text: string;
|
|
1786
2477
|
providerData?: Record<string, any> | undefined;
|
|
1787
2478
|
} | {
|
|
1788
|
-
type: "image";
|
|
1789
|
-
|
|
1790
|
-
|
|
2479
|
+
type: "image";
|
|
2480
|
+
providerData?: Record<string, any> | undefined;
|
|
2481
|
+
image?: string | {
|
|
2482
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2483
|
+
mediaType?: string | undefined;
|
|
2484
|
+
} | {
|
|
2485
|
+
url: string;
|
|
2486
|
+
} | {
|
|
2487
|
+
fileId: string;
|
|
2488
|
+
} | undefined;
|
|
2489
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
2490
|
+
} | {
|
|
2491
|
+
type: "file";
|
|
2492
|
+
file: string | {
|
|
2493
|
+
filename: string;
|
|
2494
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
2495
|
+
mediaType: string;
|
|
2496
|
+
} | {
|
|
2497
|
+
url: string;
|
|
2498
|
+
filename?: string | undefined;
|
|
2499
|
+
} | {
|
|
2500
|
+
id: string;
|
|
2501
|
+
filename?: string | undefined;
|
|
2502
|
+
};
|
|
2503
|
+
providerData?: Record<string, any> | undefined;
|
|
2504
|
+
} | ({
|
|
2505
|
+
type: "input_text";
|
|
2506
|
+
text: string;
|
|
2507
|
+
providerData?: Record<string, any> | undefined;
|
|
2508
|
+
} | {
|
|
2509
|
+
type: "input_image";
|
|
1791
2510
|
providerData?: Record<string, any> | undefined;
|
|
1792
|
-
|
|
2511
|
+
image?: string | {
|
|
2512
|
+
id: string;
|
|
2513
|
+
} | undefined;
|
|
2514
|
+
detail?: string | undefined;
|
|
2515
|
+
} | {
|
|
2516
|
+
type: "input_file";
|
|
2517
|
+
providerData?: Record<string, any> | undefined;
|
|
2518
|
+
file?: string | {
|
|
2519
|
+
id: string;
|
|
2520
|
+
} | {
|
|
2521
|
+
url: string;
|
|
2522
|
+
} | undefined;
|
|
2523
|
+
filename?: string | undefined;
|
|
2524
|
+
})[];
|
|
1793
2525
|
callId: string;
|
|
1794
2526
|
providerData?: Record<string, any> | undefined;
|
|
1795
2527
|
id?: string | undefined;
|
|
@@ -3179,27 +3911,35 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3179
3911
|
} & {
|
|
3180
3912
|
type: z.ZodLiteral<"input_image">;
|
|
3181
3913
|
/**
|
|
3182
|
-
* The image input to the model. Could be a URL,
|
|
3914
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
3915
|
+
* previously uploaded OpenAI file.
|
|
3183
3916
|
*/
|
|
3184
|
-
image: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3917
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3185
3918
|
id: z.ZodString;
|
|
3186
3919
|
}, "strip", z.ZodTypeAny, {
|
|
3187
3920
|
id: string;
|
|
3188
3921
|
}, {
|
|
3189
3922
|
id: string;
|
|
3190
|
-
}>]
|
|
3923
|
+
}>]>>;
|
|
3924
|
+
/**
|
|
3925
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
3926
|
+
* Future models may add new values, therefore this accepts any string.
|
|
3927
|
+
*/
|
|
3928
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3191
3929
|
}, "strip", z.ZodTypeAny, {
|
|
3192
3930
|
type: "input_image";
|
|
3193
|
-
image: string | {
|
|
3194
|
-
id: string;
|
|
3195
|
-
};
|
|
3196
3931
|
providerData?: Record<string, any> | undefined;
|
|
3932
|
+
image?: string | {
|
|
3933
|
+
id: string;
|
|
3934
|
+
} | undefined;
|
|
3935
|
+
detail?: string | undefined;
|
|
3197
3936
|
}, {
|
|
3198
3937
|
type: "input_image";
|
|
3199
|
-
image: string | {
|
|
3200
|
-
id: string;
|
|
3201
|
-
};
|
|
3202
3938
|
providerData?: Record<string, any> | undefined;
|
|
3939
|
+
image?: string | {
|
|
3940
|
+
id: string;
|
|
3941
|
+
} | undefined;
|
|
3942
|
+
detail?: string | undefined;
|
|
3203
3943
|
}>, z.ZodObject<{
|
|
3204
3944
|
/**
|
|
3205
3945
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -3209,9 +3949,9 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3209
3949
|
} & {
|
|
3210
3950
|
type: z.ZodLiteral<"input_file">;
|
|
3211
3951
|
/**
|
|
3212
|
-
* The file input to the model. Could be a URL,
|
|
3952
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
3213
3953
|
*/
|
|
3214
|
-
file: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3954
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3215
3955
|
id: z.ZodString;
|
|
3216
3956
|
}, "strip", z.ZodTypeAny, {
|
|
3217
3957
|
id: string;
|
|
@@ -3223,23 +3963,29 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3223
3963
|
url: string;
|
|
3224
3964
|
}, {
|
|
3225
3965
|
url: string;
|
|
3226
|
-
}>]
|
|
3966
|
+
}>]>>;
|
|
3967
|
+
/**
|
|
3968
|
+
* Optional filename metadata when uploading file data inline.
|
|
3969
|
+
*/
|
|
3970
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
3227
3971
|
}, "strip", z.ZodTypeAny, {
|
|
3228
3972
|
type: "input_file";
|
|
3229
|
-
|
|
3973
|
+
providerData?: Record<string, any> | undefined;
|
|
3974
|
+
file?: string | {
|
|
3230
3975
|
id: string;
|
|
3231
3976
|
} | {
|
|
3232
3977
|
url: string;
|
|
3233
|
-
};
|
|
3234
|
-
|
|
3978
|
+
} | undefined;
|
|
3979
|
+
filename?: string | undefined;
|
|
3235
3980
|
}, {
|
|
3236
3981
|
type: "input_file";
|
|
3237
|
-
|
|
3982
|
+
providerData?: Record<string, any> | undefined;
|
|
3983
|
+
file?: string | {
|
|
3238
3984
|
id: string;
|
|
3239
3985
|
} | {
|
|
3240
3986
|
url: string;
|
|
3241
|
-
};
|
|
3242
|
-
|
|
3987
|
+
} | undefined;
|
|
3988
|
+
filename?: string | undefined;
|
|
3243
3989
|
}>, z.ZodObject<{
|
|
3244
3990
|
/**
|
|
3245
3991
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
@@ -3291,18 +4037,20 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3291
4037
|
providerData?: Record<string, any> | undefined;
|
|
3292
4038
|
} | {
|
|
3293
4039
|
type: "input_image";
|
|
3294
|
-
image: string | {
|
|
3295
|
-
id: string;
|
|
3296
|
-
};
|
|
3297
4040
|
providerData?: Record<string, any> | undefined;
|
|
4041
|
+
image?: string | {
|
|
4042
|
+
id: string;
|
|
4043
|
+
} | undefined;
|
|
4044
|
+
detail?: string | undefined;
|
|
3298
4045
|
} | {
|
|
3299
4046
|
type: "input_file";
|
|
3300
|
-
|
|
4047
|
+
providerData?: Record<string, any> | undefined;
|
|
4048
|
+
file?: string | {
|
|
3301
4049
|
id: string;
|
|
3302
4050
|
} | {
|
|
3303
4051
|
url: string;
|
|
3304
|
-
};
|
|
3305
|
-
|
|
4052
|
+
} | undefined;
|
|
4053
|
+
filename?: string | undefined;
|
|
3306
4054
|
} | {
|
|
3307
4055
|
type: "audio";
|
|
3308
4056
|
audio: string | {
|
|
@@ -3323,18 +4071,20 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3323
4071
|
providerData?: Record<string, any> | undefined;
|
|
3324
4072
|
} | {
|
|
3325
4073
|
type: "input_image";
|
|
3326
|
-
image: string | {
|
|
3327
|
-
id: string;
|
|
3328
|
-
};
|
|
3329
4074
|
providerData?: Record<string, any> | undefined;
|
|
4075
|
+
image?: string | {
|
|
4076
|
+
id: string;
|
|
4077
|
+
} | undefined;
|
|
4078
|
+
detail?: string | undefined;
|
|
3330
4079
|
} | {
|
|
3331
4080
|
type: "input_file";
|
|
3332
|
-
|
|
4081
|
+
providerData?: Record<string, any> | undefined;
|
|
4082
|
+
file?: string | {
|
|
3333
4083
|
id: string;
|
|
3334
4084
|
} | {
|
|
3335
4085
|
url: string;
|
|
3336
|
-
};
|
|
3337
|
-
|
|
4086
|
+
} | undefined;
|
|
4087
|
+
filename?: string | undefined;
|
|
3338
4088
|
} | {
|
|
3339
4089
|
type: "audio";
|
|
3340
4090
|
audio: string | {
|
|
@@ -3913,7 +4663,7 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3913
4663
|
/**
|
|
3914
4664
|
* The output of the tool call.
|
|
3915
4665
|
*/
|
|
3916
|
-
output: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
4666
|
+
output: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3917
4667
|
/**
|
|
3918
4668
|
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
3919
4669
|
* specific fields.
|
|
@@ -3942,38 +4692,291 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3942
4692
|
} & {
|
|
3943
4693
|
type: z.ZodLiteral<"image">;
|
|
3944
4694
|
/**
|
|
3945
|
-
*
|
|
4695
|
+
* Inline image content or a reference to an uploaded file. Accepts a URL/data URL string or an
|
|
4696
|
+
* object describing the data/url/fileId source.
|
|
3946
4697
|
*/
|
|
3947
|
-
|
|
4698
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
4699
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
4700
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
4701
|
+
}, "strip", z.ZodTypeAny, {
|
|
4702
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4703
|
+
mediaType?: string | undefined;
|
|
4704
|
+
}, {
|
|
4705
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4706
|
+
mediaType?: string | undefined;
|
|
4707
|
+
}>, z.ZodObject<{
|
|
4708
|
+
url: z.ZodString;
|
|
4709
|
+
}, "strip", z.ZodTypeAny, {
|
|
4710
|
+
url: string;
|
|
4711
|
+
}, {
|
|
4712
|
+
url: string;
|
|
4713
|
+
}>, z.ZodObject<{
|
|
4714
|
+
fileId: z.ZodString;
|
|
4715
|
+
}, "strip", z.ZodTypeAny, {
|
|
4716
|
+
fileId: string;
|
|
4717
|
+
}, {
|
|
4718
|
+
fileId: string;
|
|
4719
|
+
}>]>]>>;
|
|
3948
4720
|
/**
|
|
3949
|
-
*
|
|
4721
|
+
* Controls the requested level of detail for vision models.
|
|
4722
|
+
* Use a string to avoid constraining future model capabilities.
|
|
3950
4723
|
*/
|
|
3951
|
-
|
|
4724
|
+
detail: z.ZodOptional<z.ZodType<"low" | "high" | "auto" | (string & {}), z.ZodTypeDef, "low" | "high" | "auto" | (string & {})>>;
|
|
3952
4725
|
}, "strip", z.ZodTypeAny, {
|
|
3953
4726
|
type: "image";
|
|
3954
|
-
data: string;
|
|
3955
|
-
mediaType: string;
|
|
3956
4727
|
providerData?: Record<string, any> | undefined;
|
|
4728
|
+
image?: string | {
|
|
4729
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4730
|
+
mediaType?: string | undefined;
|
|
4731
|
+
} | {
|
|
4732
|
+
url: string;
|
|
4733
|
+
} | {
|
|
4734
|
+
fileId: string;
|
|
4735
|
+
} | undefined;
|
|
4736
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
3957
4737
|
}, {
|
|
3958
4738
|
type: "image";
|
|
3959
|
-
data: string;
|
|
3960
|
-
mediaType: string;
|
|
3961
4739
|
providerData?: Record<string, any> | undefined;
|
|
3962
|
-
|
|
4740
|
+
image?: string | {
|
|
4741
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4742
|
+
mediaType?: string | undefined;
|
|
4743
|
+
} | {
|
|
4744
|
+
url: string;
|
|
4745
|
+
} | {
|
|
4746
|
+
fileId: string;
|
|
4747
|
+
} | undefined;
|
|
4748
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
4749
|
+
}>, z.ZodObject<{
|
|
4750
|
+
/**
|
|
4751
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
4752
|
+
* specific fields.
|
|
4753
|
+
*/
|
|
4754
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4755
|
+
} & {
|
|
4756
|
+
type: z.ZodLiteral<"file">;
|
|
4757
|
+
/**
|
|
4758
|
+
* File output reference. Provide either a string (data URL / base64), a data object (requires
|
|
4759
|
+
* mediaType + filename), or an object pointing to an uploaded file/URL.
|
|
4760
|
+
*/
|
|
4761
|
+
file: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
4762
|
+
data: z.ZodUnion<[z.ZodString, z.ZodType<Uint8Array<ArrayBuffer>, z.ZodTypeDef, Uint8Array<ArrayBuffer>>]>;
|
|
4763
|
+
mediaType: z.ZodString;
|
|
4764
|
+
filename: z.ZodString;
|
|
4765
|
+
}, "strip", z.ZodTypeAny, {
|
|
4766
|
+
filename: string;
|
|
4767
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4768
|
+
mediaType: string;
|
|
4769
|
+
}, {
|
|
4770
|
+
filename: string;
|
|
4771
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4772
|
+
mediaType: string;
|
|
4773
|
+
}>, z.ZodObject<{
|
|
4774
|
+
url: z.ZodString;
|
|
4775
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
4776
|
+
}, "strip", z.ZodTypeAny, {
|
|
4777
|
+
url: string;
|
|
4778
|
+
filename?: string | undefined;
|
|
4779
|
+
}, {
|
|
4780
|
+
url: string;
|
|
4781
|
+
filename?: string | undefined;
|
|
4782
|
+
}>, z.ZodObject<{
|
|
4783
|
+
id: z.ZodString;
|
|
4784
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
4785
|
+
}, "strip", z.ZodTypeAny, {
|
|
4786
|
+
id: string;
|
|
4787
|
+
filename?: string | undefined;
|
|
4788
|
+
}, {
|
|
4789
|
+
id: string;
|
|
4790
|
+
filename?: string | undefined;
|
|
4791
|
+
}>]>;
|
|
4792
|
+
}, "strip", z.ZodTypeAny, {
|
|
4793
|
+
type: "file";
|
|
4794
|
+
file: string | {
|
|
4795
|
+
filename: string;
|
|
4796
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4797
|
+
mediaType: string;
|
|
4798
|
+
} | {
|
|
4799
|
+
url: string;
|
|
4800
|
+
filename?: string | undefined;
|
|
4801
|
+
} | {
|
|
4802
|
+
id: string;
|
|
4803
|
+
filename?: string | undefined;
|
|
4804
|
+
};
|
|
4805
|
+
providerData?: Record<string, any> | undefined;
|
|
4806
|
+
}, {
|
|
4807
|
+
type: "file";
|
|
4808
|
+
file: string | {
|
|
4809
|
+
filename: string;
|
|
4810
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4811
|
+
mediaType: string;
|
|
4812
|
+
} | {
|
|
4813
|
+
url: string;
|
|
4814
|
+
filename?: string | undefined;
|
|
4815
|
+
} | {
|
|
4816
|
+
id: string;
|
|
4817
|
+
filename?: string | undefined;
|
|
4818
|
+
};
|
|
4819
|
+
providerData?: Record<string, any> | undefined;
|
|
4820
|
+
}>]>, z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
4821
|
+
/**
|
|
4822
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
4823
|
+
* specific fields.
|
|
4824
|
+
*/
|
|
4825
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4826
|
+
} & {
|
|
4827
|
+
type: z.ZodLiteral<"input_text">;
|
|
4828
|
+
/**
|
|
4829
|
+
* A text input for example a message from a user
|
|
4830
|
+
*/
|
|
4831
|
+
text: z.ZodString;
|
|
4832
|
+
}, "strip", z.ZodTypeAny, {
|
|
4833
|
+
type: "input_text";
|
|
4834
|
+
text: string;
|
|
4835
|
+
providerData?: Record<string, any> | undefined;
|
|
4836
|
+
}, {
|
|
4837
|
+
type: "input_text";
|
|
4838
|
+
text: string;
|
|
4839
|
+
providerData?: Record<string, any> | undefined;
|
|
4840
|
+
}>, z.ZodObject<{
|
|
4841
|
+
/**
|
|
4842
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
4843
|
+
* specific fields.
|
|
4844
|
+
*/
|
|
4845
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4846
|
+
} & {
|
|
4847
|
+
type: z.ZodLiteral<"input_image">;
|
|
4848
|
+
/**
|
|
4849
|
+
* The image input to the model. Could be provided inline (`image`), as a URL, or by reference to a
|
|
4850
|
+
* previously uploaded OpenAI file.
|
|
4851
|
+
*/
|
|
4852
|
+
image: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
4853
|
+
id: z.ZodString;
|
|
4854
|
+
}, "strip", z.ZodTypeAny, {
|
|
4855
|
+
id: string;
|
|
4856
|
+
}, {
|
|
4857
|
+
id: string;
|
|
4858
|
+
}>]>>;
|
|
4859
|
+
/**
|
|
4860
|
+
* Controls the level of detail requested for image understanding tasks.
|
|
4861
|
+
* Future models may add new values, therefore this accepts any string.
|
|
4862
|
+
*/
|
|
4863
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4864
|
+
}, "strip", z.ZodTypeAny, {
|
|
4865
|
+
type: "input_image";
|
|
4866
|
+
providerData?: Record<string, any> | undefined;
|
|
4867
|
+
image?: string | {
|
|
4868
|
+
id: string;
|
|
4869
|
+
} | undefined;
|
|
4870
|
+
detail?: string | undefined;
|
|
4871
|
+
}, {
|
|
4872
|
+
type: "input_image";
|
|
4873
|
+
providerData?: Record<string, any> | undefined;
|
|
4874
|
+
image?: string | {
|
|
4875
|
+
id: string;
|
|
4876
|
+
} | undefined;
|
|
4877
|
+
detail?: string | undefined;
|
|
4878
|
+
}>, z.ZodObject<{
|
|
4879
|
+
/**
|
|
4880
|
+
* Additional optional provider specific data. Used for custom functionality or model provider
|
|
4881
|
+
* specific fields.
|
|
4882
|
+
*/
|
|
4883
|
+
providerData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
4884
|
+
} & {
|
|
4885
|
+
type: z.ZodLiteral<"input_file">;
|
|
4886
|
+
/**
|
|
4887
|
+
* The file input to the model. Could be raw data, a URL, or an OpenAI file ID.
|
|
4888
|
+
*/
|
|
4889
|
+
file: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
4890
|
+
id: z.ZodString;
|
|
4891
|
+
}, "strip", z.ZodTypeAny, {
|
|
4892
|
+
id: string;
|
|
4893
|
+
}, {
|
|
4894
|
+
id: string;
|
|
4895
|
+
}>]>, z.ZodObject<{
|
|
4896
|
+
url: z.ZodString;
|
|
4897
|
+
}, "strip", z.ZodTypeAny, {
|
|
4898
|
+
url: string;
|
|
4899
|
+
}, {
|
|
4900
|
+
url: string;
|
|
4901
|
+
}>]>>;
|
|
4902
|
+
/**
|
|
4903
|
+
* Optional filename metadata when uploading file data inline.
|
|
4904
|
+
*/
|
|
4905
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
4906
|
+
}, "strip", z.ZodTypeAny, {
|
|
4907
|
+
type: "input_file";
|
|
4908
|
+
providerData?: Record<string, any> | undefined;
|
|
4909
|
+
file?: string | {
|
|
4910
|
+
id: string;
|
|
4911
|
+
} | {
|
|
4912
|
+
url: string;
|
|
4913
|
+
} | undefined;
|
|
4914
|
+
filename?: string | undefined;
|
|
4915
|
+
}, {
|
|
4916
|
+
type: "input_file";
|
|
4917
|
+
providerData?: Record<string, any> | undefined;
|
|
4918
|
+
file?: string | {
|
|
4919
|
+
id: string;
|
|
4920
|
+
} | {
|
|
4921
|
+
url: string;
|
|
4922
|
+
} | undefined;
|
|
4923
|
+
filename?: string | undefined;
|
|
4924
|
+
}>]>, "many">]>;
|
|
3963
4925
|
}, "strip", z.ZodTypeAny, {
|
|
3964
4926
|
type: "function_call_result";
|
|
3965
4927
|
status: "in_progress" | "completed" | "incomplete";
|
|
3966
4928
|
name: string;
|
|
3967
|
-
output: {
|
|
4929
|
+
output: string | {
|
|
3968
4930
|
type: "text";
|
|
3969
4931
|
text: string;
|
|
3970
4932
|
providerData?: Record<string, any> | undefined;
|
|
3971
4933
|
} | {
|
|
3972
4934
|
type: "image";
|
|
3973
|
-
data: string;
|
|
3974
|
-
mediaType: string;
|
|
3975
4935
|
providerData?: Record<string, any> | undefined;
|
|
3976
|
-
|
|
4936
|
+
image?: string | {
|
|
4937
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4938
|
+
mediaType?: string | undefined;
|
|
4939
|
+
} | {
|
|
4940
|
+
url: string;
|
|
4941
|
+
} | {
|
|
4942
|
+
fileId: string;
|
|
4943
|
+
} | undefined;
|
|
4944
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
4945
|
+
} | {
|
|
4946
|
+
type: "file";
|
|
4947
|
+
file: string | {
|
|
4948
|
+
filename: string;
|
|
4949
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4950
|
+
mediaType: string;
|
|
4951
|
+
} | {
|
|
4952
|
+
url: string;
|
|
4953
|
+
filename?: string | undefined;
|
|
4954
|
+
} | {
|
|
4955
|
+
id: string;
|
|
4956
|
+
filename?: string | undefined;
|
|
4957
|
+
};
|
|
4958
|
+
providerData?: Record<string, any> | undefined;
|
|
4959
|
+
} | ({
|
|
4960
|
+
type: "input_text";
|
|
4961
|
+
text: string;
|
|
4962
|
+
providerData?: Record<string, any> | undefined;
|
|
4963
|
+
} | {
|
|
4964
|
+
type: "input_image";
|
|
4965
|
+
providerData?: Record<string, any> | undefined;
|
|
4966
|
+
image?: string | {
|
|
4967
|
+
id: string;
|
|
4968
|
+
} | undefined;
|
|
4969
|
+
detail?: string | undefined;
|
|
4970
|
+
} | {
|
|
4971
|
+
type: "input_file";
|
|
4972
|
+
providerData?: Record<string, any> | undefined;
|
|
4973
|
+
file?: string | {
|
|
4974
|
+
id: string;
|
|
4975
|
+
} | {
|
|
4976
|
+
url: string;
|
|
4977
|
+
} | undefined;
|
|
4978
|
+
filename?: string | undefined;
|
|
4979
|
+
})[];
|
|
3977
4980
|
callId: string;
|
|
3978
4981
|
providerData?: Record<string, any> | undefined;
|
|
3979
4982
|
id?: string | undefined;
|
|
@@ -3981,16 +4984,57 @@ export declare const ModelItem: z.ZodUnion<[z.ZodObject<{
|
|
|
3981
4984
|
type: "function_call_result";
|
|
3982
4985
|
status: "in_progress" | "completed" | "incomplete";
|
|
3983
4986
|
name: string;
|
|
3984
|
-
output: {
|
|
4987
|
+
output: string | {
|
|
3985
4988
|
type: "text";
|
|
3986
4989
|
text: string;
|
|
3987
4990
|
providerData?: Record<string, any> | undefined;
|
|
3988
4991
|
} | {
|
|
3989
4992
|
type: "image";
|
|
3990
|
-
data: string;
|
|
3991
|
-
mediaType: string;
|
|
3992
4993
|
providerData?: Record<string, any> | undefined;
|
|
3993
|
-
|
|
4994
|
+
image?: string | {
|
|
4995
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
4996
|
+
mediaType?: string | undefined;
|
|
4997
|
+
} | {
|
|
4998
|
+
url: string;
|
|
4999
|
+
} | {
|
|
5000
|
+
fileId: string;
|
|
5001
|
+
} | undefined;
|
|
5002
|
+
detail?: "low" | "high" | "auto" | (string & {}) | undefined;
|
|
5003
|
+
} | {
|
|
5004
|
+
type: "file";
|
|
5005
|
+
file: string | {
|
|
5006
|
+
filename: string;
|
|
5007
|
+
data: string | Uint8Array<ArrayBuffer>;
|
|
5008
|
+
mediaType: string;
|
|
5009
|
+
} | {
|
|
5010
|
+
url: string;
|
|
5011
|
+
filename?: string | undefined;
|
|
5012
|
+
} | {
|
|
5013
|
+
id: string;
|
|
5014
|
+
filename?: string | undefined;
|
|
5015
|
+
};
|
|
5016
|
+
providerData?: Record<string, any> | undefined;
|
|
5017
|
+
} | ({
|
|
5018
|
+
type: "input_text";
|
|
5019
|
+
text: string;
|
|
5020
|
+
providerData?: Record<string, any> | undefined;
|
|
5021
|
+
} | {
|
|
5022
|
+
type: "input_image";
|
|
5023
|
+
providerData?: Record<string, any> | undefined;
|
|
5024
|
+
image?: string | {
|
|
5025
|
+
id: string;
|
|
5026
|
+
} | undefined;
|
|
5027
|
+
detail?: string | undefined;
|
|
5028
|
+
} | {
|
|
5029
|
+
type: "input_file";
|
|
5030
|
+
providerData?: Record<string, any> | undefined;
|
|
5031
|
+
file?: string | {
|
|
5032
|
+
id: string;
|
|
5033
|
+
} | {
|
|
5034
|
+
url: string;
|
|
5035
|
+
} | undefined;
|
|
5036
|
+
filename?: string | undefined;
|
|
5037
|
+
})[];
|
|
3994
5038
|
callId: string;
|
|
3995
5039
|
providerData?: Record<string, any> | undefined;
|
|
3996
5040
|
id?: string | undefined;
|