@convex-dev/agent 0.7.1 → 0.7.3
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/README.md +5 -8
- package/dist/client/messages.d.ts +10 -0
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +1 -0
- package/dist/client/messages.js.map +1 -1
- package/dist/component/_generated/component.d.ts +10 -8
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/messages.d.ts +340 -338
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +74 -14
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +726 -622
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/streams.d.ts +6 -1
- package/dist/component/streams.d.ts.map +1 -1
- package/dist/component/streams.js +14 -15
- package/dist/component/streams.js.map +1 -1
- package/dist/component/threads.d.ts.map +1 -1
- package/dist/component/threads.js +1 -0
- package/dist/component/threads.js.map +1 -1
- package/dist/component/vector/index.d.ts +9 -9
- package/dist/component/vector/index.d.ts.map +1 -1
- package/dist/component/vector/tables.d.ts +5 -5
- package/dist/component/vector/tables.d.ts.map +1 -1
- package/dist/component/vector/tables.js +1 -1
- package/dist/component/vector/tables.js.map +1 -1
- package/dist/errors.d.ts +2 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +106 -0
- package/dist/errors.js.map +1 -0
- package/dist/validators.d.ts +1952 -1952
- package/dist/vercel/client/definePlaygroundAPI.d.ts +132 -132
- package/dist/vercel/client/messages.d.ts +50 -32
- package/dist/vercel/client/messages.d.ts.map +1 -1
- package/dist/vercel/client/messages.js +2 -0
- package/dist/vercel/client/messages.js.map +1 -1
- package/dist/vercel/client/search.d.ts +475 -32
- package/dist/vercel/client/search.d.ts.map +1 -1
- package/dist/vercel/client/search.js +34 -9
- package/dist/vercel/client/search.js.map +1 -1
- package/dist/vercel/client/start.d.ts.map +1 -1
- package/dist/vercel/client/start.js +1 -0
- package/dist/vercel/client/start.js.map +1 -1
- package/dist/vercel/client/streamText.d.ts +1 -2
- package/dist/vercel/client/streamText.d.ts.map +1 -1
- package/dist/vercel/client/streamText.js +79 -22
- package/dist/vercel/client/streamText.js.map +1 -1
- package/dist/vercel/client/streaming.d.ts +326 -305
- package/dist/vercel/client/streaming.d.ts.map +1 -1
- package/dist/vercel/client/streaming.js +140 -25
- package/dist/vercel/client/streaming.js.map +1 -1
- package/dist/vercel/client/types.d.ts +2 -0
- package/dist/vercel/client/types.d.ts.map +1 -1
- package/dist/vercel/client/types.js.map +1 -1
- package/dist/vercel/client/utils.d.ts +9 -5
- package/dist/vercel/client/utils.d.ts.map +1 -1
- package/dist/vercel/client/utils.js +13 -13
- package/dist/vercel/client/utils.js.map +1 -1
- package/dist/vercel/index.d.ts +91 -90
- package/dist/vercel/index.d.ts.map +1 -1
- package/dist/vercel/index.js +2 -0
- package/dist/vercel/index.js.map +1 -1
- package/package.json +16 -9
- package/src/client/messages.ts +12 -0
- package/src/component/_generated/component.ts +10 -0
- package/src/component/messages.test.ts +404 -0
- package/src/component/messages.ts +94 -12
- package/src/component/streams.test.ts +54 -1
- package/src/component/streams.ts +20 -17
- package/src/component/threads.test.ts +39 -0
- package/src/component/threads.ts +1 -0
- package/src/component/vector/tables.ts +1 -1
- package/src/errors.test.ts +76 -0
- package/src/errors.ts +113 -0
- package/src/vercel/client/deltaFlush.test.ts +106 -0
- package/src/vercel/client/index.test.ts +47 -0
- package/src/vercel/client/messages.ts +20 -0
- package/src/vercel/client/search.test.ts +183 -8
- package/src/vercel/client/search.ts +46 -12
- package/src/vercel/client/start.ts +1 -0
- package/src/vercel/client/streamText.test.ts +577 -18
- package/src/vercel/client/streamText.ts +84 -32
- package/src/vercel/client/streaming.integration.test.ts +40 -3
- package/src/vercel/client/streaming.test.ts +101 -7
- package/src/vercel/client/streaming.throttle.test.ts +144 -0
- package/src/vercel/client/streaming.ts +161 -25
- package/src/vercel/client/types.ts +2 -0
- package/src/vercel/client/utils.test.ts +97 -0
- package/src/vercel/client/utils.ts +15 -15
- package/src/vercel/index.ts +2 -0
|
@@ -87,17 +87,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
87
87
|
}, Promise<{
|
|
88
88
|
streams: import("./types.js").SyncStreamsReturnValue;
|
|
89
89
|
page: {
|
|
90
|
-
text?: string | undefined;
|
|
91
|
-
reasoning?: string | undefined;
|
|
92
|
-
id?: string | undefined;
|
|
93
|
-
userId?: string | undefined;
|
|
94
|
-
embeddingId?: string | undefined;
|
|
95
|
-
fileIds?: string[] | undefined;
|
|
96
|
-
error?: string | undefined;
|
|
97
|
-
agentName?: string | undefined;
|
|
98
|
-
model?: string | undefined;
|
|
99
|
-
provider?: string | undefined;
|
|
100
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
101
90
|
message?: {
|
|
102
91
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
103
92
|
role: "user";
|
|
@@ -121,11 +110,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
121
110
|
mediaType?: string | undefined;
|
|
122
111
|
mimeType?: string | undefined;
|
|
123
112
|
filename?: string | undefined;
|
|
124
|
-
type: "file";
|
|
125
113
|
data: string | ArrayBuffer | {
|
|
126
114
|
type: "reference";
|
|
127
115
|
reference: Record<string, string>;
|
|
128
116
|
};
|
|
117
|
+
type: "file";
|
|
129
118
|
})[];
|
|
130
119
|
} | {
|
|
131
120
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -141,11 +130,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
141
130
|
mediaType?: string | undefined;
|
|
142
131
|
mimeType?: string | undefined;
|
|
143
132
|
filename?: string | undefined;
|
|
144
|
-
type: "file";
|
|
145
133
|
data: string | ArrayBuffer | {
|
|
146
134
|
type: "reference";
|
|
147
135
|
reference: Record<string, string>;
|
|
148
136
|
};
|
|
137
|
+
type: "file";
|
|
149
138
|
} | {
|
|
150
139
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
151
140
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -153,9 +142,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
153
142
|
text: string;
|
|
154
143
|
type: "reasoning";
|
|
155
144
|
} | {
|
|
145
|
+
data?: string | ArrayBuffer | undefined;
|
|
156
146
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
157
147
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
158
|
-
data?: string | ArrayBuffer | undefined;
|
|
159
148
|
url?: string | undefined;
|
|
160
149
|
type: "reasoning-file";
|
|
161
150
|
mediaType: string;
|
|
@@ -167,8 +156,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
167
156
|
} | {
|
|
168
157
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
169
158
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
170
|
-
type: "redacted-reasoning";
|
|
171
159
|
data: string;
|
|
160
|
+
type: "redacted-reasoning";
|
|
172
161
|
} | {
|
|
173
162
|
title?: string | undefined;
|
|
174
163
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -225,8 +214,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
225
214
|
} | {
|
|
226
215
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
227
216
|
filename?: string | undefined;
|
|
228
|
-
type: "file";
|
|
229
|
-
mediaType: string;
|
|
230
217
|
data: {
|
|
231
218
|
type: "reference";
|
|
232
219
|
reference: Record<string, string>;
|
|
@@ -234,22 +221,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
234
221
|
type: "url";
|
|
235
222
|
url: string;
|
|
236
223
|
} | {
|
|
237
|
-
type: "data";
|
|
238
224
|
data: string | ArrayBuffer;
|
|
225
|
+
type: "data";
|
|
239
226
|
} | {
|
|
240
227
|
text: string;
|
|
241
228
|
type: "text";
|
|
242
229
|
};
|
|
230
|
+
type: "file";
|
|
231
|
+
mediaType: string;
|
|
243
232
|
} | {
|
|
233
|
+
data: string;
|
|
244
234
|
type: "media";
|
|
245
235
|
mediaType: string;
|
|
246
|
-
data: string;
|
|
247
236
|
} | {
|
|
248
237
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
249
238
|
filename?: string | undefined;
|
|
239
|
+
data: string;
|
|
250
240
|
type: "file-data";
|
|
251
241
|
mediaType: string;
|
|
252
|
-
data: string;
|
|
253
242
|
} | {
|
|
254
243
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
255
244
|
mediaType?: string | undefined;
|
|
@@ -265,9 +254,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
265
254
|
providerReference: Record<string, string>;
|
|
266
255
|
} | {
|
|
267
256
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
257
|
+
data: string;
|
|
268
258
|
type: "image-data";
|
|
269
259
|
mediaType: string;
|
|
270
|
-
data: string;
|
|
271
260
|
} | {
|
|
272
261
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
273
262
|
type: "image-file-reference";
|
|
@@ -292,8 +281,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
292
281
|
type: "text";
|
|
293
282
|
} | {
|
|
294
283
|
mimeType?: string | undefined;
|
|
295
|
-
type: "image";
|
|
296
284
|
data: string;
|
|
285
|
+
type: "image";
|
|
297
286
|
})[] | undefined;
|
|
298
287
|
type: "tool-result";
|
|
299
288
|
toolCallId: string;
|
|
@@ -361,8 +350,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
361
350
|
} | {
|
|
362
351
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
363
352
|
filename?: string | undefined;
|
|
364
|
-
type: "file";
|
|
365
|
-
mediaType: string;
|
|
366
353
|
data: {
|
|
367
354
|
type: "reference";
|
|
368
355
|
reference: Record<string, string>;
|
|
@@ -370,22 +357,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
370
357
|
type: "url";
|
|
371
358
|
url: string;
|
|
372
359
|
} | {
|
|
373
|
-
type: "data";
|
|
374
360
|
data: string | ArrayBuffer;
|
|
361
|
+
type: "data";
|
|
375
362
|
} | {
|
|
376
363
|
text: string;
|
|
377
364
|
type: "text";
|
|
378
365
|
};
|
|
366
|
+
type: "file";
|
|
367
|
+
mediaType: string;
|
|
379
368
|
} | {
|
|
369
|
+
data: string;
|
|
380
370
|
type: "media";
|
|
381
371
|
mediaType: string;
|
|
382
|
-
data: string;
|
|
383
372
|
} | {
|
|
384
373
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
385
374
|
filename?: string | undefined;
|
|
375
|
+
data: string;
|
|
386
376
|
type: "file-data";
|
|
387
377
|
mediaType: string;
|
|
388
|
-
data: string;
|
|
389
378
|
} | {
|
|
390
379
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
391
380
|
mediaType?: string | undefined;
|
|
@@ -401,9 +390,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
401
390
|
providerReference: Record<string, string>;
|
|
402
391
|
} | {
|
|
403
392
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
393
|
+
data: string;
|
|
404
394
|
type: "image-data";
|
|
405
395
|
mediaType: string;
|
|
406
|
-
data: string;
|
|
407
396
|
} | {
|
|
408
397
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
409
398
|
type: "image-file-reference";
|
|
@@ -428,8 +417,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
428
417
|
type: "text";
|
|
429
418
|
} | {
|
|
430
419
|
mimeType?: string | undefined;
|
|
431
|
-
type: "image";
|
|
432
420
|
data: string;
|
|
421
|
+
type: "image";
|
|
433
422
|
})[] | undefined;
|
|
434
423
|
type: "tool-result";
|
|
435
424
|
toolCallId: string;
|
|
@@ -448,6 +437,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
448
437
|
role: "system";
|
|
449
438
|
content: string;
|
|
450
439
|
} | undefined;
|
|
440
|
+
error?: string | undefined;
|
|
441
|
+
text?: string | undefined;
|
|
442
|
+
reasoning?: string | undefined;
|
|
443
|
+
id?: string | undefined;
|
|
444
|
+
userId?: string | undefined;
|
|
445
|
+
embeddingId?: string | undefined;
|
|
446
|
+
fileIds?: string[] | undefined;
|
|
447
|
+
agentName?: string | undefined;
|
|
448
|
+
model?: string | undefined;
|
|
449
|
+
provider?: string | undefined;
|
|
450
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
451
451
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
452
452
|
usage?: {
|
|
453
453
|
promptTokens?: number | undefined;
|
|
@@ -487,8 +487,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
487
487
|
type: "compatibility";
|
|
488
488
|
feature: string;
|
|
489
489
|
} | {
|
|
490
|
-
type: "deprecated";
|
|
491
490
|
message: string;
|
|
491
|
+
type: "deprecated";
|
|
492
492
|
setting: string;
|
|
493
493
|
} | {
|
|
494
494
|
details?: string | undefined;
|
|
@@ -499,8 +499,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
499
499
|
tool: any;
|
|
500
500
|
type: "unsupported-tool";
|
|
501
501
|
} | {
|
|
502
|
-
type: "other";
|
|
503
502
|
message: string;
|
|
503
|
+
type: "other";
|
|
504
504
|
})[] | undefined;
|
|
505
505
|
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
506
506
|
reasoningDetails?: ({
|
|
@@ -514,8 +514,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
514
514
|
text: string;
|
|
515
515
|
type: "text";
|
|
516
516
|
} | {
|
|
517
|
-
type: "redacted";
|
|
518
517
|
data: string;
|
|
518
|
+
type: "redacted";
|
|
519
519
|
})[] | undefined;
|
|
520
520
|
tool: boolean;
|
|
521
521
|
status: "pending" | "success" | "failed";
|
|
@@ -576,11 +576,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
576
576
|
mediaType?: string | undefined;
|
|
577
577
|
mimeType?: string | undefined;
|
|
578
578
|
filename?: string | undefined;
|
|
579
|
-
type: "file";
|
|
580
579
|
data: string | ArrayBuffer | {
|
|
581
580
|
type: "reference";
|
|
582
581
|
reference: Record<string, string>;
|
|
583
582
|
};
|
|
583
|
+
type: "file";
|
|
584
584
|
})[];
|
|
585
585
|
} | {
|
|
586
586
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -596,11 +596,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
596
596
|
mediaType?: string | undefined;
|
|
597
597
|
mimeType?: string | undefined;
|
|
598
598
|
filename?: string | undefined;
|
|
599
|
-
type: "file";
|
|
600
599
|
data: string | ArrayBuffer | {
|
|
601
600
|
type: "reference";
|
|
602
601
|
reference: Record<string, string>;
|
|
603
602
|
};
|
|
603
|
+
type: "file";
|
|
604
604
|
} | {
|
|
605
605
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
606
606
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -608,9 +608,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
608
608
|
text: string;
|
|
609
609
|
type: "reasoning";
|
|
610
610
|
} | {
|
|
611
|
+
data?: string | ArrayBuffer | undefined;
|
|
611
612
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
612
613
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
613
|
-
data?: string | ArrayBuffer | undefined;
|
|
614
614
|
url?: string | undefined;
|
|
615
615
|
type: "reasoning-file";
|
|
616
616
|
mediaType: string;
|
|
@@ -622,8 +622,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
622
622
|
} | {
|
|
623
623
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
624
624
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
625
|
-
type: "redacted-reasoning";
|
|
626
625
|
data: string;
|
|
626
|
+
type: "redacted-reasoning";
|
|
627
627
|
} | {
|
|
628
628
|
title?: string | undefined;
|
|
629
629
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -680,8 +680,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
680
680
|
} | {
|
|
681
681
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
682
682
|
filename?: string | undefined;
|
|
683
|
-
type: "file";
|
|
684
|
-
mediaType: string;
|
|
685
683
|
data: {
|
|
686
684
|
type: "reference";
|
|
687
685
|
reference: Record<string, string>;
|
|
@@ -689,22 +687,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
689
687
|
type: "url";
|
|
690
688
|
url: string;
|
|
691
689
|
} | {
|
|
692
|
-
type: "data";
|
|
693
690
|
data: string | ArrayBuffer;
|
|
691
|
+
type: "data";
|
|
694
692
|
} | {
|
|
695
693
|
text: string;
|
|
696
694
|
type: "text";
|
|
697
695
|
};
|
|
696
|
+
type: "file";
|
|
697
|
+
mediaType: string;
|
|
698
698
|
} | {
|
|
699
|
+
data: string;
|
|
699
700
|
type: "media";
|
|
700
701
|
mediaType: string;
|
|
701
|
-
data: string;
|
|
702
702
|
} | {
|
|
703
703
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
704
704
|
filename?: string | undefined;
|
|
705
|
+
data: string;
|
|
705
706
|
type: "file-data";
|
|
706
707
|
mediaType: string;
|
|
707
|
-
data: string;
|
|
708
708
|
} | {
|
|
709
709
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
710
710
|
mediaType?: string | undefined;
|
|
@@ -720,9 +720,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
720
720
|
providerReference: Record<string, string>;
|
|
721
721
|
} | {
|
|
722
722
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
723
|
+
data: string;
|
|
723
724
|
type: "image-data";
|
|
724
725
|
mediaType: string;
|
|
725
|
-
data: string;
|
|
726
726
|
} | {
|
|
727
727
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
728
728
|
type: "image-file-reference";
|
|
@@ -747,8 +747,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
747
747
|
type: "text";
|
|
748
748
|
} | {
|
|
749
749
|
mimeType?: string | undefined;
|
|
750
|
-
type: "image";
|
|
751
750
|
data: string;
|
|
751
|
+
type: "image";
|
|
752
752
|
})[] | undefined;
|
|
753
753
|
type: "tool-result";
|
|
754
754
|
toolCallId: string;
|
|
@@ -816,8 +816,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
816
816
|
} | {
|
|
817
817
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
818
818
|
filename?: string | undefined;
|
|
819
|
-
type: "file";
|
|
820
|
-
mediaType: string;
|
|
821
819
|
data: {
|
|
822
820
|
type: "reference";
|
|
823
821
|
reference: Record<string, string>;
|
|
@@ -825,22 +823,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
825
823
|
type: "url";
|
|
826
824
|
url: string;
|
|
827
825
|
} | {
|
|
828
|
-
type: "data";
|
|
829
826
|
data: string | ArrayBuffer;
|
|
827
|
+
type: "data";
|
|
830
828
|
} | {
|
|
831
829
|
text: string;
|
|
832
830
|
type: "text";
|
|
833
831
|
};
|
|
832
|
+
type: "file";
|
|
833
|
+
mediaType: string;
|
|
834
834
|
} | {
|
|
835
|
+
data: string;
|
|
835
836
|
type: "media";
|
|
836
837
|
mediaType: string;
|
|
837
|
-
data: string;
|
|
838
838
|
} | {
|
|
839
839
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
840
840
|
filename?: string | undefined;
|
|
841
|
+
data: string;
|
|
841
842
|
type: "file-data";
|
|
842
843
|
mediaType: string;
|
|
843
|
-
data: string;
|
|
844
844
|
} | {
|
|
845
845
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
846
846
|
mediaType?: string | undefined;
|
|
@@ -856,9 +856,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
856
856
|
providerReference: Record<string, string>;
|
|
857
857
|
} | {
|
|
858
858
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
859
|
+
data: string;
|
|
859
860
|
type: "image-data";
|
|
860
861
|
mediaType: string;
|
|
861
|
-
data: string;
|
|
862
862
|
} | {
|
|
863
863
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
864
864
|
type: "image-file-reference";
|
|
@@ -883,8 +883,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
883
883
|
type: "text";
|
|
884
884
|
} | {
|
|
885
885
|
mimeType?: string | undefined;
|
|
886
|
-
type: "image";
|
|
887
886
|
data: string;
|
|
887
|
+
type: "image";
|
|
888
888
|
})[] | undefined;
|
|
889
889
|
type: "tool-result";
|
|
890
890
|
toolCallId: string;
|
|
@@ -929,17 +929,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
929
929
|
}, Promise<{
|
|
930
930
|
text: string;
|
|
931
931
|
messages: {
|
|
932
|
-
text?: string | undefined;
|
|
933
|
-
reasoning?: string | undefined;
|
|
934
|
-
id?: string | undefined;
|
|
935
|
-
userId?: string | undefined;
|
|
936
|
-
embeddingId?: string | undefined;
|
|
937
|
-
fileIds?: string[] | undefined;
|
|
938
|
-
error?: string | undefined;
|
|
939
|
-
agentName?: string | undefined;
|
|
940
|
-
model?: string | undefined;
|
|
941
|
-
provider?: string | undefined;
|
|
942
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
943
932
|
message?: {
|
|
944
933
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
945
934
|
role: "user";
|
|
@@ -963,11 +952,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
963
952
|
mediaType?: string | undefined;
|
|
964
953
|
mimeType?: string | undefined;
|
|
965
954
|
filename?: string | undefined;
|
|
966
|
-
type: "file";
|
|
967
955
|
data: string | ArrayBuffer | {
|
|
968
956
|
type: "reference";
|
|
969
957
|
reference: Record<string, string>;
|
|
970
958
|
};
|
|
959
|
+
type: "file";
|
|
971
960
|
})[];
|
|
972
961
|
} | {
|
|
973
962
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -983,11 +972,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
983
972
|
mediaType?: string | undefined;
|
|
984
973
|
mimeType?: string | undefined;
|
|
985
974
|
filename?: string | undefined;
|
|
986
|
-
type: "file";
|
|
987
975
|
data: string | ArrayBuffer | {
|
|
988
976
|
type: "reference";
|
|
989
977
|
reference: Record<string, string>;
|
|
990
978
|
};
|
|
979
|
+
type: "file";
|
|
991
980
|
} | {
|
|
992
981
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
993
982
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -995,9 +984,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
995
984
|
text: string;
|
|
996
985
|
type: "reasoning";
|
|
997
986
|
} | {
|
|
987
|
+
data?: string | ArrayBuffer | undefined;
|
|
998
988
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
999
989
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1000
|
-
data?: string | ArrayBuffer | undefined;
|
|
1001
990
|
url?: string | undefined;
|
|
1002
991
|
type: "reasoning-file";
|
|
1003
992
|
mediaType: string;
|
|
@@ -1009,8 +998,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1009
998
|
} | {
|
|
1010
999
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1011
1000
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1012
|
-
type: "redacted-reasoning";
|
|
1013
1001
|
data: string;
|
|
1002
|
+
type: "redacted-reasoning";
|
|
1014
1003
|
} | {
|
|
1015
1004
|
title?: string | undefined;
|
|
1016
1005
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1067,8 +1056,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1067
1056
|
} | {
|
|
1068
1057
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1069
1058
|
filename?: string | undefined;
|
|
1070
|
-
type: "file";
|
|
1071
|
-
mediaType: string;
|
|
1072
1059
|
data: {
|
|
1073
1060
|
type: "reference";
|
|
1074
1061
|
reference: Record<string, string>;
|
|
@@ -1076,22 +1063,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1076
1063
|
type: "url";
|
|
1077
1064
|
url: string;
|
|
1078
1065
|
} | {
|
|
1079
|
-
type: "data";
|
|
1080
1066
|
data: string | ArrayBuffer;
|
|
1067
|
+
type: "data";
|
|
1081
1068
|
} | {
|
|
1082
1069
|
text: string;
|
|
1083
1070
|
type: "text";
|
|
1084
1071
|
};
|
|
1072
|
+
type: "file";
|
|
1073
|
+
mediaType: string;
|
|
1085
1074
|
} | {
|
|
1075
|
+
data: string;
|
|
1086
1076
|
type: "media";
|
|
1087
1077
|
mediaType: string;
|
|
1088
|
-
data: string;
|
|
1089
1078
|
} | {
|
|
1090
1079
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1091
1080
|
filename?: string | undefined;
|
|
1081
|
+
data: string;
|
|
1092
1082
|
type: "file-data";
|
|
1093
1083
|
mediaType: string;
|
|
1094
|
-
data: string;
|
|
1095
1084
|
} | {
|
|
1096
1085
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1097
1086
|
mediaType?: string | undefined;
|
|
@@ -1107,9 +1096,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1107
1096
|
providerReference: Record<string, string>;
|
|
1108
1097
|
} | {
|
|
1109
1098
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1099
|
+
data: string;
|
|
1110
1100
|
type: "image-data";
|
|
1111
1101
|
mediaType: string;
|
|
1112
|
-
data: string;
|
|
1113
1102
|
} | {
|
|
1114
1103
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1115
1104
|
type: "image-file-reference";
|
|
@@ -1134,8 +1123,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1134
1123
|
type: "text";
|
|
1135
1124
|
} | {
|
|
1136
1125
|
mimeType?: string | undefined;
|
|
1137
|
-
type: "image";
|
|
1138
1126
|
data: string;
|
|
1127
|
+
type: "image";
|
|
1139
1128
|
})[] | undefined;
|
|
1140
1129
|
type: "tool-result";
|
|
1141
1130
|
toolCallId: string;
|
|
@@ -1203,8 +1192,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1203
1192
|
} | {
|
|
1204
1193
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1205
1194
|
filename?: string | undefined;
|
|
1206
|
-
type: "file";
|
|
1207
|
-
mediaType: string;
|
|
1208
1195
|
data: {
|
|
1209
1196
|
type: "reference";
|
|
1210
1197
|
reference: Record<string, string>;
|
|
@@ -1212,22 +1199,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1212
1199
|
type: "url";
|
|
1213
1200
|
url: string;
|
|
1214
1201
|
} | {
|
|
1215
|
-
type: "data";
|
|
1216
1202
|
data: string | ArrayBuffer;
|
|
1203
|
+
type: "data";
|
|
1217
1204
|
} | {
|
|
1218
1205
|
text: string;
|
|
1219
1206
|
type: "text";
|
|
1220
1207
|
};
|
|
1208
|
+
type: "file";
|
|
1209
|
+
mediaType: string;
|
|
1221
1210
|
} | {
|
|
1211
|
+
data: string;
|
|
1222
1212
|
type: "media";
|
|
1223
1213
|
mediaType: string;
|
|
1224
|
-
data: string;
|
|
1225
1214
|
} | {
|
|
1226
1215
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1227
1216
|
filename?: string | undefined;
|
|
1217
|
+
data: string;
|
|
1228
1218
|
type: "file-data";
|
|
1229
1219
|
mediaType: string;
|
|
1230
|
-
data: string;
|
|
1231
1220
|
} | {
|
|
1232
1221
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1233
1222
|
mediaType?: string | undefined;
|
|
@@ -1243,9 +1232,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1243
1232
|
providerReference: Record<string, string>;
|
|
1244
1233
|
} | {
|
|
1245
1234
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1235
|
+
data: string;
|
|
1246
1236
|
type: "image-data";
|
|
1247
1237
|
mediaType: string;
|
|
1248
|
-
data: string;
|
|
1249
1238
|
} | {
|
|
1250
1239
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1251
1240
|
type: "image-file-reference";
|
|
@@ -1270,8 +1259,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1270
1259
|
type: "text";
|
|
1271
1260
|
} | {
|
|
1272
1261
|
mimeType?: string | undefined;
|
|
1273
|
-
type: "image";
|
|
1274
1262
|
data: string;
|
|
1263
|
+
type: "image";
|
|
1275
1264
|
})[] | undefined;
|
|
1276
1265
|
type: "tool-result";
|
|
1277
1266
|
toolCallId: string;
|
|
@@ -1290,6 +1279,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1290
1279
|
role: "system";
|
|
1291
1280
|
content: string;
|
|
1292
1281
|
} | undefined;
|
|
1282
|
+
error?: string | undefined;
|
|
1283
|
+
text?: string | undefined;
|
|
1284
|
+
reasoning?: string | undefined;
|
|
1285
|
+
id?: string | undefined;
|
|
1286
|
+
userId?: string | undefined;
|
|
1287
|
+
embeddingId?: string | undefined;
|
|
1288
|
+
fileIds?: string[] | undefined;
|
|
1289
|
+
agentName?: string | undefined;
|
|
1290
|
+
model?: string | undefined;
|
|
1291
|
+
provider?: string | undefined;
|
|
1292
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1293
1293
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1294
1294
|
usage?: {
|
|
1295
1295
|
promptTokens?: number | undefined;
|
|
@@ -1329,8 +1329,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1329
1329
|
type: "compatibility";
|
|
1330
1330
|
feature: string;
|
|
1331
1331
|
} | {
|
|
1332
|
-
type: "deprecated";
|
|
1333
1332
|
message: string;
|
|
1333
|
+
type: "deprecated";
|
|
1334
1334
|
setting: string;
|
|
1335
1335
|
} | {
|
|
1336
1336
|
details?: string | undefined;
|
|
@@ -1341,8 +1341,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1341
1341
|
tool: any;
|
|
1342
1342
|
type: "unsupported-tool";
|
|
1343
1343
|
} | {
|
|
1344
|
-
type: "other";
|
|
1345
1344
|
message: string;
|
|
1345
|
+
type: "other";
|
|
1346
1346
|
})[] | undefined;
|
|
1347
1347
|
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1348
1348
|
reasoningDetails?: ({
|
|
@@ -1356,8 +1356,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1356
1356
|
text: string;
|
|
1357
1357
|
type: "text";
|
|
1358
1358
|
} | {
|
|
1359
|
-
type: "redacted";
|
|
1360
1359
|
data: string;
|
|
1360
|
+
type: "redacted";
|
|
1361
1361
|
})[] | undefined;
|
|
1362
1362
|
tool: boolean;
|
|
1363
1363
|
status: "pending" | "success" | "failed";
|
|
@@ -1394,11 +1394,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1394
1394
|
mediaType?: string | undefined;
|
|
1395
1395
|
mimeType?: string | undefined;
|
|
1396
1396
|
filename?: string | undefined;
|
|
1397
|
-
type: "file";
|
|
1398
1397
|
data: string | ArrayBuffer | {
|
|
1399
1398
|
type: "reference";
|
|
1400
1399
|
reference: Record<string, string>;
|
|
1401
1400
|
};
|
|
1401
|
+
type: "file";
|
|
1402
1402
|
})[];
|
|
1403
1403
|
} | {
|
|
1404
1404
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1414,11 +1414,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1414
1414
|
mediaType?: string | undefined;
|
|
1415
1415
|
mimeType?: string | undefined;
|
|
1416
1416
|
filename?: string | undefined;
|
|
1417
|
-
type: "file";
|
|
1418
1417
|
data: string | ArrayBuffer | {
|
|
1419
1418
|
type: "reference";
|
|
1420
1419
|
reference: Record<string, string>;
|
|
1421
1420
|
};
|
|
1421
|
+
type: "file";
|
|
1422
1422
|
} | {
|
|
1423
1423
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1424
1424
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1426,9 +1426,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1426
1426
|
text: string;
|
|
1427
1427
|
type: "reasoning";
|
|
1428
1428
|
} | {
|
|
1429
|
+
data?: string | ArrayBuffer | undefined;
|
|
1429
1430
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1430
1431
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1431
|
-
data?: string | ArrayBuffer | undefined;
|
|
1432
1432
|
url?: string | undefined;
|
|
1433
1433
|
type: "reasoning-file";
|
|
1434
1434
|
mediaType: string;
|
|
@@ -1440,8 +1440,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1440
1440
|
} | {
|
|
1441
1441
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1442
1442
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1443
|
-
type: "redacted-reasoning";
|
|
1444
1443
|
data: string;
|
|
1444
|
+
type: "redacted-reasoning";
|
|
1445
1445
|
} | {
|
|
1446
1446
|
title?: string | undefined;
|
|
1447
1447
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1498,8 +1498,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1498
1498
|
} | {
|
|
1499
1499
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1500
1500
|
filename?: string | undefined;
|
|
1501
|
-
type: "file";
|
|
1502
|
-
mediaType: string;
|
|
1503
1501
|
data: {
|
|
1504
1502
|
type: "reference";
|
|
1505
1503
|
reference: Record<string, string>;
|
|
@@ -1507,22 +1505,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1507
1505
|
type: "url";
|
|
1508
1506
|
url: string;
|
|
1509
1507
|
} | {
|
|
1510
|
-
type: "data";
|
|
1511
1508
|
data: string | ArrayBuffer;
|
|
1509
|
+
type: "data";
|
|
1512
1510
|
} | {
|
|
1513
1511
|
text: string;
|
|
1514
1512
|
type: "text";
|
|
1515
1513
|
};
|
|
1514
|
+
type: "file";
|
|
1515
|
+
mediaType: string;
|
|
1516
1516
|
} | {
|
|
1517
|
+
data: string;
|
|
1517
1518
|
type: "media";
|
|
1518
1519
|
mediaType: string;
|
|
1519
|
-
data: string;
|
|
1520
1520
|
} | {
|
|
1521
1521
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1522
1522
|
filename?: string | undefined;
|
|
1523
|
+
data: string;
|
|
1523
1524
|
type: "file-data";
|
|
1524
1525
|
mediaType: string;
|
|
1525
|
-
data: string;
|
|
1526
1526
|
} | {
|
|
1527
1527
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1528
1528
|
mediaType?: string | undefined;
|
|
@@ -1538,9 +1538,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1538
1538
|
providerReference: Record<string, string>;
|
|
1539
1539
|
} | {
|
|
1540
1540
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1541
|
+
data: string;
|
|
1541
1542
|
type: "image-data";
|
|
1542
1543
|
mediaType: string;
|
|
1543
|
-
data: string;
|
|
1544
1544
|
} | {
|
|
1545
1545
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1546
1546
|
type: "image-file-reference";
|
|
@@ -1565,8 +1565,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1565
1565
|
type: "text";
|
|
1566
1566
|
} | {
|
|
1567
1567
|
mimeType?: string | undefined;
|
|
1568
|
-
type: "image";
|
|
1569
1568
|
data: string;
|
|
1569
|
+
type: "image";
|
|
1570
1570
|
})[] | undefined;
|
|
1571
1571
|
type: "tool-result";
|
|
1572
1572
|
toolCallId: string;
|
|
@@ -1634,8 +1634,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1634
1634
|
} | {
|
|
1635
1635
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1636
1636
|
filename?: string | undefined;
|
|
1637
|
-
type: "file";
|
|
1638
|
-
mediaType: string;
|
|
1639
1637
|
data: {
|
|
1640
1638
|
type: "reference";
|
|
1641
1639
|
reference: Record<string, string>;
|
|
@@ -1643,22 +1641,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1643
1641
|
type: "url";
|
|
1644
1642
|
url: string;
|
|
1645
1643
|
} | {
|
|
1646
|
-
type: "data";
|
|
1647
1644
|
data: string | ArrayBuffer;
|
|
1645
|
+
type: "data";
|
|
1648
1646
|
} | {
|
|
1649
1647
|
text: string;
|
|
1650
1648
|
type: "text";
|
|
1651
1649
|
};
|
|
1650
|
+
type: "file";
|
|
1651
|
+
mediaType: string;
|
|
1652
1652
|
} | {
|
|
1653
|
+
data: string;
|
|
1653
1654
|
type: "media";
|
|
1654
1655
|
mediaType: string;
|
|
1655
|
-
data: string;
|
|
1656
1656
|
} | {
|
|
1657
1657
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1658
1658
|
filename?: string | undefined;
|
|
1659
|
+
data: string;
|
|
1659
1660
|
type: "file-data";
|
|
1660
1661
|
mediaType: string;
|
|
1661
|
-
data: string;
|
|
1662
1662
|
} | {
|
|
1663
1663
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1664
1664
|
mediaType?: string | undefined;
|
|
@@ -1674,9 +1674,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1674
1674
|
providerReference: Record<string, string>;
|
|
1675
1675
|
} | {
|
|
1676
1676
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1677
|
+
data: string;
|
|
1677
1678
|
type: "image-data";
|
|
1678
1679
|
mediaType: string;
|
|
1679
|
-
data: string;
|
|
1680
1680
|
} | {
|
|
1681
1681
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1682
1682
|
type: "image-file-reference";
|
|
@@ -1701,8 +1701,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1701
1701
|
type: "text";
|
|
1702
1702
|
} | {
|
|
1703
1703
|
mimeType?: string | undefined;
|
|
1704
|
-
type: "image";
|
|
1705
1704
|
data: string;
|
|
1705
|
+
type: "image";
|
|
1706
1706
|
})[] | undefined;
|
|
1707
1707
|
type: "tool-result";
|
|
1708
1708
|
toolCallId: string;
|
|
@@ -1742,17 +1742,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1742
1742
|
};
|
|
1743
1743
|
apiKey: string;
|
|
1744
1744
|
}, Promise<{
|
|
1745
|
-
text?: string | undefined;
|
|
1746
|
-
reasoning?: string | undefined;
|
|
1747
|
-
id?: string | undefined;
|
|
1748
|
-
userId?: string | undefined;
|
|
1749
|
-
embeddingId?: string | undefined;
|
|
1750
|
-
fileIds?: string[] | undefined;
|
|
1751
|
-
error?: string | undefined;
|
|
1752
|
-
agentName?: string | undefined;
|
|
1753
|
-
model?: string | undefined;
|
|
1754
|
-
provider?: string | undefined;
|
|
1755
|
-
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1756
1745
|
message?: {
|
|
1757
1746
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1758
1747
|
role: "user";
|
|
@@ -1776,11 +1765,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1776
1765
|
mediaType?: string | undefined;
|
|
1777
1766
|
mimeType?: string | undefined;
|
|
1778
1767
|
filename?: string | undefined;
|
|
1779
|
-
type: "file";
|
|
1780
1768
|
data: string | ArrayBuffer | {
|
|
1781
1769
|
type: "reference";
|
|
1782
1770
|
reference: Record<string, string>;
|
|
1783
1771
|
};
|
|
1772
|
+
type: "file";
|
|
1784
1773
|
})[];
|
|
1785
1774
|
} | {
|
|
1786
1775
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1796,11 +1785,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1796
1785
|
mediaType?: string | undefined;
|
|
1797
1786
|
mimeType?: string | undefined;
|
|
1798
1787
|
filename?: string | undefined;
|
|
1799
|
-
type: "file";
|
|
1800
1788
|
data: string | ArrayBuffer | {
|
|
1801
1789
|
type: "reference";
|
|
1802
1790
|
reference: Record<string, string>;
|
|
1803
1791
|
};
|
|
1792
|
+
type: "file";
|
|
1804
1793
|
} | {
|
|
1805
1794
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1806
1795
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1808,9 +1797,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1808
1797
|
text: string;
|
|
1809
1798
|
type: "reasoning";
|
|
1810
1799
|
} | {
|
|
1800
|
+
data?: string | ArrayBuffer | undefined;
|
|
1811
1801
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1812
1802
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1813
|
-
data?: string | ArrayBuffer | undefined;
|
|
1814
1803
|
url?: string | undefined;
|
|
1815
1804
|
type: "reasoning-file";
|
|
1816
1805
|
mediaType: string;
|
|
@@ -1822,8 +1811,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1822
1811
|
} | {
|
|
1823
1812
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1824
1813
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1825
|
-
type: "redacted-reasoning";
|
|
1826
1814
|
data: string;
|
|
1815
|
+
type: "redacted-reasoning";
|
|
1827
1816
|
} | {
|
|
1828
1817
|
title?: string | undefined;
|
|
1829
1818
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1880,8 +1869,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1880
1869
|
} | {
|
|
1881
1870
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1882
1871
|
filename?: string | undefined;
|
|
1883
|
-
type: "file";
|
|
1884
|
-
mediaType: string;
|
|
1885
1872
|
data: {
|
|
1886
1873
|
type: "reference";
|
|
1887
1874
|
reference: Record<string, string>;
|
|
@@ -1889,22 +1876,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1889
1876
|
type: "url";
|
|
1890
1877
|
url: string;
|
|
1891
1878
|
} | {
|
|
1892
|
-
type: "data";
|
|
1893
1879
|
data: string | ArrayBuffer;
|
|
1880
|
+
type: "data";
|
|
1894
1881
|
} | {
|
|
1895
1882
|
text: string;
|
|
1896
1883
|
type: "text";
|
|
1897
1884
|
};
|
|
1885
|
+
type: "file";
|
|
1886
|
+
mediaType: string;
|
|
1898
1887
|
} | {
|
|
1888
|
+
data: string;
|
|
1899
1889
|
type: "media";
|
|
1900
1890
|
mediaType: string;
|
|
1901
|
-
data: string;
|
|
1902
1891
|
} | {
|
|
1903
1892
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1904
1893
|
filename?: string | undefined;
|
|
1894
|
+
data: string;
|
|
1905
1895
|
type: "file-data";
|
|
1906
1896
|
mediaType: string;
|
|
1907
|
-
data: string;
|
|
1908
1897
|
} | {
|
|
1909
1898
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1910
1899
|
mediaType?: string | undefined;
|
|
@@ -1920,9 +1909,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1920
1909
|
providerReference: Record<string, string>;
|
|
1921
1910
|
} | {
|
|
1922
1911
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1912
|
+
data: string;
|
|
1923
1913
|
type: "image-data";
|
|
1924
1914
|
mediaType: string;
|
|
1925
|
-
data: string;
|
|
1926
1915
|
} | {
|
|
1927
1916
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1928
1917
|
type: "image-file-reference";
|
|
@@ -1947,8 +1936,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1947
1936
|
type: "text";
|
|
1948
1937
|
} | {
|
|
1949
1938
|
mimeType?: string | undefined;
|
|
1950
|
-
type: "image";
|
|
1951
1939
|
data: string;
|
|
1940
|
+
type: "image";
|
|
1952
1941
|
})[] | undefined;
|
|
1953
1942
|
type: "tool-result";
|
|
1954
1943
|
toolCallId: string;
|
|
@@ -2016,8 +2005,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2016
2005
|
} | {
|
|
2017
2006
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2018
2007
|
filename?: string | undefined;
|
|
2019
|
-
type: "file";
|
|
2020
|
-
mediaType: string;
|
|
2021
2008
|
data: {
|
|
2022
2009
|
type: "reference";
|
|
2023
2010
|
reference: Record<string, string>;
|
|
@@ -2025,22 +2012,24 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2025
2012
|
type: "url";
|
|
2026
2013
|
url: string;
|
|
2027
2014
|
} | {
|
|
2028
|
-
type: "data";
|
|
2029
2015
|
data: string | ArrayBuffer;
|
|
2016
|
+
type: "data";
|
|
2030
2017
|
} | {
|
|
2031
2018
|
text: string;
|
|
2032
2019
|
type: "text";
|
|
2033
2020
|
};
|
|
2021
|
+
type: "file";
|
|
2022
|
+
mediaType: string;
|
|
2034
2023
|
} | {
|
|
2024
|
+
data: string;
|
|
2035
2025
|
type: "media";
|
|
2036
2026
|
mediaType: string;
|
|
2037
|
-
data: string;
|
|
2038
2027
|
} | {
|
|
2039
2028
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2040
2029
|
filename?: string | undefined;
|
|
2030
|
+
data: string;
|
|
2041
2031
|
type: "file-data";
|
|
2042
2032
|
mediaType: string;
|
|
2043
|
-
data: string;
|
|
2044
2033
|
} | {
|
|
2045
2034
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2046
2035
|
mediaType?: string | undefined;
|
|
@@ -2056,9 +2045,9 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2056
2045
|
providerReference: Record<string, string>;
|
|
2057
2046
|
} | {
|
|
2058
2047
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2048
|
+
data: string;
|
|
2059
2049
|
type: "image-data";
|
|
2060
2050
|
mediaType: string;
|
|
2061
|
-
data: string;
|
|
2062
2051
|
} | {
|
|
2063
2052
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2064
2053
|
type: "image-file-reference";
|
|
@@ -2083,8 +2072,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2083
2072
|
type: "text";
|
|
2084
2073
|
} | {
|
|
2085
2074
|
mimeType?: string | undefined;
|
|
2086
|
-
type: "image";
|
|
2087
2075
|
data: string;
|
|
2076
|
+
type: "image";
|
|
2088
2077
|
})[] | undefined;
|
|
2089
2078
|
type: "tool-result";
|
|
2090
2079
|
toolCallId: string;
|
|
@@ -2103,6 +2092,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2103
2092
|
role: "system";
|
|
2104
2093
|
content: string;
|
|
2105
2094
|
} | undefined;
|
|
2095
|
+
error?: string | undefined;
|
|
2096
|
+
text?: string | undefined;
|
|
2097
|
+
reasoning?: string | undefined;
|
|
2098
|
+
id?: string | undefined;
|
|
2099
|
+
userId?: string | undefined;
|
|
2100
|
+
embeddingId?: string | undefined;
|
|
2101
|
+
fileIds?: string[] | undefined;
|
|
2102
|
+
agentName?: string | undefined;
|
|
2103
|
+
model?: string | undefined;
|
|
2104
|
+
provider?: string | undefined;
|
|
2105
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
2106
2106
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
2107
2107
|
usage?: {
|
|
2108
2108
|
promptTokens?: number | undefined;
|
|
@@ -2142,8 +2142,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2142
2142
|
type: "compatibility";
|
|
2143
2143
|
feature: string;
|
|
2144
2144
|
} | {
|
|
2145
|
-
type: "deprecated";
|
|
2146
2145
|
message: string;
|
|
2146
|
+
type: "deprecated";
|
|
2147
2147
|
setting: string;
|
|
2148
2148
|
} | {
|
|
2149
2149
|
details?: string | undefined;
|
|
@@ -2154,8 +2154,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2154
2154
|
tool: any;
|
|
2155
2155
|
type: "unsupported-tool";
|
|
2156
2156
|
} | {
|
|
2157
|
-
type: "other";
|
|
2158
2157
|
message: string;
|
|
2158
|
+
type: "other";
|
|
2159
2159
|
})[] | undefined;
|
|
2160
2160
|
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
2161
2161
|
reasoningDetails?: ({
|
|
@@ -2169,8 +2169,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
2169
2169
|
text: string;
|
|
2170
2170
|
type: "text";
|
|
2171
2171
|
} | {
|
|
2172
|
-
type: "redacted";
|
|
2173
2172
|
data: string;
|
|
2173
|
+
type: "redacted";
|
|
2174
2174
|
})[] | undefined;
|
|
2175
2175
|
tool: boolean;
|
|
2176
2176
|
status: "pending" | "success" | "failed";
|