@convex-dev/agent 0.3.2 → 0.6.0-alpha.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/UIMessages.d.ts +3 -2
- package/dist/UIMessages.d.ts.map +1 -1
- package/dist/UIMessages.js +100 -19
- package/dist/UIMessages.js.map +1 -1
- package/dist/client/createTool.d.ts +129 -25
- package/dist/client/createTool.d.ts.map +1 -1
- package/dist/client/createTool.js +65 -8
- package/dist/client/createTool.js.map +1 -1
- package/dist/client/definePlaygroundAPI.d.ts +560 -35
- package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
- package/dist/client/files.d.ts.map +1 -1
- package/dist/client/files.js +4 -2
- package/dist/client/files.js.map +1 -1
- package/dist/client/index.d.ts +462 -37
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +26 -7
- package/dist/client/index.js.map +1 -1
- package/dist/client/messages.d.ts +114 -9
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/mockModel.d.ts +17 -17
- package/dist/client/mockModel.d.ts.map +1 -1
- package/dist/client/mockModel.js +8 -6
- package/dist/client/mockModel.js.map +1 -1
- package/dist/client/saveInputMessages.d.ts +1 -1
- package/dist/client/saveInputMessages.d.ts.map +1 -1
- package/dist/client/saveInputMessages.js +1 -1
- package/dist/client/saveInputMessages.js.map +1 -1
- package/dist/client/search.d.ts +132 -14
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/search.js +66 -19
- package/dist/client/search.js.map +1 -1
- package/dist/client/streamText.d.ts +4 -4
- package/dist/client/streamText.d.ts.map +1 -1
- package/dist/client/streamText.js.map +1 -1
- package/dist/client/streaming.d.ts +1491 -87
- package/dist/client/streaming.d.ts.map +1 -1
- package/dist/client/types.d.ts +26 -6
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +862 -19
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/files.d.ts +12 -6
- package/dist/component/files.d.ts.map +1 -1
- package/dist/component/files.js +10 -2
- package/dist/component/files.js.map +1 -1
- package/dist/component/messages.d.ts +1247 -92
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/schema.d.ts +2823 -217
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +3 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/component/streams.js +1 -1
- package/dist/component/streams.js.map +1 -1
- package/dist/component/threads.d.ts +10 -10
- package/dist/component/vector/index.d.ts +1 -1
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js +40 -5
- package/dist/deltas.js.map +1 -1
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +117 -25
- package/dist/mapping.js.map +1 -1
- package/dist/react/useThreadMessages.d.ts.map +1 -1
- package/dist/react/useThreadMessages.js +17 -9
- package/dist/react/useThreadMessages.js.map +1 -1
- package/dist/shared.d.ts +2 -2
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js.map +1 -1
- package/dist/validators.d.ts +12196 -624
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +152 -9
- package/dist/validators.js.map +1 -1
- package/package.json +24 -22
- package/src/UIMessages.combineUIMessages.test.ts +239 -0
- package/src/UIMessages.ts +184 -66
- package/src/client/createTool.ts +291 -67
- package/src/client/files.ts +4 -2
- package/src/client/index.test.ts +1 -0
- package/src/client/index.ts +46 -25
- package/src/client/mockModel.ts +36 -34
- package/src/client/saveInputMessages.ts +2 -2
- package/src/client/search.test.ts +166 -0
- package/src/client/search.ts +121 -38
- package/src/client/streamText.ts +5 -5
- package/src/client/types.ts +31 -18
- package/src/component/_generated/component.ts +2329 -338
- package/src/component/files.ts +11 -2
- package/src/component/messages.test.ts +7 -7
- package/src/component/schema.ts +3 -1
- package/src/component/setup.test.ts +7 -0
- package/src/component/streams.ts +1 -1
- package/src/deltas.test.ts +90 -0
- package/src/deltas.ts +47 -8
- package/src/fromUIMessages.test.ts +32 -27
- package/src/mapping.test.ts +48 -0
- package/src/mapping.ts +234 -142
- package/src/react/useThreadMessages.ts +21 -9
- package/src/shared.ts +2 -0
- package/src/toUIMessages.test.ts +539 -1
- package/src/validators.ts +179 -20
- package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
|
@@ -105,15 +105,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
105
105
|
text: string;
|
|
106
106
|
} | {
|
|
107
107
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
108
|
+
mediaType?: string | undefined;
|
|
108
109
|
mimeType?: string | undefined;
|
|
109
110
|
type: "image";
|
|
110
111
|
image: string | ArrayBuffer;
|
|
111
112
|
} | {
|
|
112
113
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
113
114
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
115
|
+
mediaType?: string | undefined;
|
|
116
|
+
mimeType?: string | undefined;
|
|
114
117
|
filename?: string | undefined;
|
|
115
118
|
type: "file";
|
|
116
|
-
mimeType: string;
|
|
117
119
|
data: string | ArrayBuffer;
|
|
118
120
|
})[];
|
|
119
121
|
} | {
|
|
@@ -127,9 +129,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
127
129
|
} | {
|
|
128
130
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
129
131
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
132
|
+
mediaType?: string | undefined;
|
|
133
|
+
mimeType?: string | undefined;
|
|
130
134
|
filename?: string | undefined;
|
|
131
135
|
type: "file";
|
|
132
|
-
mimeType: string;
|
|
133
136
|
data: string | ArrayBuffer;
|
|
134
137
|
} | {
|
|
135
138
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -145,6 +148,16 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
145
148
|
} | {
|
|
146
149
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
147
150
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
151
|
+
args?: any;
|
|
152
|
+
providerExecuted?: boolean | undefined;
|
|
153
|
+
type: "tool-call";
|
|
154
|
+
toolCallId: string;
|
|
155
|
+
toolName: string;
|
|
156
|
+
input: any;
|
|
157
|
+
} | {
|
|
158
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
159
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
160
|
+
input?: any;
|
|
148
161
|
providerExecuted?: boolean | undefined;
|
|
149
162
|
type: "tool-call";
|
|
150
163
|
toolCallId: string;
|
|
@@ -156,26 +169,65 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
156
169
|
args?: any;
|
|
157
170
|
providerExecuted?: boolean | undefined;
|
|
158
171
|
output?: {
|
|
172
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
159
173
|
type: "text";
|
|
160
174
|
value: string;
|
|
161
175
|
} | {
|
|
176
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
162
177
|
type: "json";
|
|
163
178
|
value: any;
|
|
164
179
|
} | {
|
|
180
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
165
181
|
type: "error-text";
|
|
166
182
|
value: string;
|
|
167
183
|
} | {
|
|
184
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
168
185
|
type: "error-json";
|
|
169
186
|
value: any;
|
|
187
|
+
} | {
|
|
188
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
189
|
+
reason?: string | undefined;
|
|
190
|
+
type: "execution-denied";
|
|
170
191
|
} | {
|
|
171
192
|
type: "content";
|
|
172
193
|
value: ({
|
|
194
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
173
195
|
type: "text";
|
|
174
196
|
text: string;
|
|
175
197
|
} | {
|
|
176
198
|
type: "media";
|
|
199
|
+
mediaType: string;
|
|
200
|
+
data: string;
|
|
201
|
+
} | {
|
|
202
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
203
|
+
filename?: string | undefined;
|
|
204
|
+
type: "file-data";
|
|
205
|
+
mediaType: string;
|
|
177
206
|
data: string;
|
|
207
|
+
} | {
|
|
208
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
209
|
+
type: "file-url";
|
|
210
|
+
url: string;
|
|
211
|
+
} | {
|
|
212
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
213
|
+
type: "file-id";
|
|
214
|
+
fileId: string | Record<string, string>;
|
|
215
|
+
} | {
|
|
216
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
217
|
+
type: "image-data";
|
|
178
218
|
mediaType: string;
|
|
219
|
+
data: string;
|
|
220
|
+
} | {
|
|
221
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
222
|
+
type: "image-url";
|
|
223
|
+
url: string;
|
|
224
|
+
} | {
|
|
225
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
226
|
+
type: "image-file-id";
|
|
227
|
+
fileId: string | Record<string, string>;
|
|
228
|
+
} | {
|
|
229
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
230
|
+
type: "custom";
|
|
179
231
|
})[];
|
|
180
232
|
} | undefined;
|
|
181
233
|
result?: any;
|
|
@@ -197,8 +249,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
197
249
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
198
250
|
id: string;
|
|
199
251
|
type: "source";
|
|
200
|
-
sourceType: "url";
|
|
201
252
|
url: string;
|
|
253
|
+
sourceType: "url";
|
|
202
254
|
} | {
|
|
203
255
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
204
256
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -208,36 +260,81 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
208
260
|
type: "source";
|
|
209
261
|
mediaType: string;
|
|
210
262
|
sourceType: "document";
|
|
263
|
+
} | {
|
|
264
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
265
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
266
|
+
type: "tool-approval-request";
|
|
267
|
+
toolCallId: string;
|
|
268
|
+
approvalId: string;
|
|
211
269
|
})[];
|
|
212
270
|
} | {
|
|
213
271
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
214
272
|
role: "tool";
|
|
215
|
-
content: {
|
|
273
|
+
content: ({
|
|
216
274
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
217
275
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
218
276
|
args?: any;
|
|
219
277
|
providerExecuted?: boolean | undefined;
|
|
220
278
|
output?: {
|
|
279
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
221
280
|
type: "text";
|
|
222
281
|
value: string;
|
|
223
282
|
} | {
|
|
283
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
224
284
|
type: "json";
|
|
225
285
|
value: any;
|
|
226
286
|
} | {
|
|
287
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
227
288
|
type: "error-text";
|
|
228
289
|
value: string;
|
|
229
290
|
} | {
|
|
291
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
230
292
|
type: "error-json";
|
|
231
293
|
value: any;
|
|
294
|
+
} | {
|
|
295
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
296
|
+
reason?: string | undefined;
|
|
297
|
+
type: "execution-denied";
|
|
232
298
|
} | {
|
|
233
299
|
type: "content";
|
|
234
300
|
value: ({
|
|
301
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
235
302
|
type: "text";
|
|
236
303
|
text: string;
|
|
237
304
|
} | {
|
|
238
305
|
type: "media";
|
|
306
|
+
mediaType: string;
|
|
239
307
|
data: string;
|
|
308
|
+
} | {
|
|
309
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
310
|
+
filename?: string | undefined;
|
|
311
|
+
type: "file-data";
|
|
312
|
+
mediaType: string;
|
|
313
|
+
data: string;
|
|
314
|
+
} | {
|
|
315
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
316
|
+
type: "file-url";
|
|
317
|
+
url: string;
|
|
318
|
+
} | {
|
|
319
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
320
|
+
type: "file-id";
|
|
321
|
+
fileId: string | Record<string, string>;
|
|
322
|
+
} | {
|
|
323
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
324
|
+
type: "image-data";
|
|
240
325
|
mediaType: string;
|
|
326
|
+
data: string;
|
|
327
|
+
} | {
|
|
328
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
329
|
+
type: "image-url";
|
|
330
|
+
url: string;
|
|
331
|
+
} | {
|
|
332
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
333
|
+
type: "image-file-id";
|
|
334
|
+
fileId: string | Record<string, string>;
|
|
335
|
+
} | {
|
|
336
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
337
|
+
type: "custom";
|
|
241
338
|
})[];
|
|
242
339
|
} | undefined;
|
|
243
340
|
result?: any;
|
|
@@ -253,7 +350,15 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
253
350
|
type: "tool-result";
|
|
254
351
|
toolCallId: string;
|
|
255
352
|
toolName: string;
|
|
256
|
-
}
|
|
353
|
+
} | {
|
|
354
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
355
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
356
|
+
providerExecuted?: boolean | undefined;
|
|
357
|
+
reason?: string | undefined;
|
|
358
|
+
type: "tool-approval-response";
|
|
359
|
+
approvalId: string;
|
|
360
|
+
approved: boolean;
|
|
361
|
+
})[];
|
|
257
362
|
} | {
|
|
258
363
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
259
364
|
role: "system";
|
|
@@ -275,8 +380,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
275
380
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
276
381
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
277
382
|
id: string;
|
|
278
|
-
sourceType: "url";
|
|
279
383
|
url: string;
|
|
384
|
+
sourceType: "url";
|
|
280
385
|
} | {
|
|
281
386
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
282
387
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -299,7 +404,7 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
299
404
|
type: "other";
|
|
300
405
|
message: string;
|
|
301
406
|
})[] | undefined;
|
|
302
|
-
finishReason?: "
|
|
407
|
+
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
303
408
|
reasoningDetails?: ({
|
|
304
409
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
305
410
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -314,13 +419,13 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
314
419
|
type: "redacted";
|
|
315
420
|
data: string;
|
|
316
421
|
})[] | undefined;
|
|
317
|
-
_id: string;
|
|
318
|
-
_creationTime: number;
|
|
319
422
|
status: "pending" | "success" | "failed";
|
|
320
423
|
order: number;
|
|
424
|
+
_creationTime: number;
|
|
321
425
|
threadId: string;
|
|
322
426
|
stepOrder: number;
|
|
323
427
|
tool: boolean;
|
|
428
|
+
_id: string;
|
|
324
429
|
}[];
|
|
325
430
|
isDone: boolean;
|
|
326
431
|
continueCursor: import("convex/server").Cursor;
|
|
@@ -360,15 +465,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
360
465
|
text: string;
|
|
361
466
|
} | {
|
|
362
467
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
468
|
+
mediaType?: string | undefined;
|
|
363
469
|
mimeType?: string | undefined;
|
|
364
470
|
type: "image";
|
|
365
471
|
image: string | ArrayBuffer;
|
|
366
472
|
} | {
|
|
367
473
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
368
474
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
475
|
+
mediaType?: string | undefined;
|
|
476
|
+
mimeType?: string | undefined;
|
|
369
477
|
filename?: string | undefined;
|
|
370
478
|
type: "file";
|
|
371
|
-
mimeType: string;
|
|
372
479
|
data: string | ArrayBuffer;
|
|
373
480
|
})[];
|
|
374
481
|
} | {
|
|
@@ -382,9 +489,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
382
489
|
} | {
|
|
383
490
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
384
491
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
492
|
+
mediaType?: string | undefined;
|
|
493
|
+
mimeType?: string | undefined;
|
|
385
494
|
filename?: string | undefined;
|
|
386
495
|
type: "file";
|
|
387
|
-
mimeType: string;
|
|
388
496
|
data: string | ArrayBuffer;
|
|
389
497
|
} | {
|
|
390
498
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -400,6 +508,16 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
400
508
|
} | {
|
|
401
509
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
402
510
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
511
|
+
args?: any;
|
|
512
|
+
providerExecuted?: boolean | undefined;
|
|
513
|
+
type: "tool-call";
|
|
514
|
+
toolCallId: string;
|
|
515
|
+
toolName: string;
|
|
516
|
+
input: any;
|
|
517
|
+
} | {
|
|
518
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
519
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
520
|
+
input?: any;
|
|
403
521
|
providerExecuted?: boolean | undefined;
|
|
404
522
|
type: "tool-call";
|
|
405
523
|
toolCallId: string;
|
|
@@ -411,26 +529,65 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
411
529
|
args?: any;
|
|
412
530
|
providerExecuted?: boolean | undefined;
|
|
413
531
|
output?: {
|
|
532
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
414
533
|
type: "text";
|
|
415
534
|
value: string;
|
|
416
535
|
} | {
|
|
536
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
417
537
|
type: "json";
|
|
418
538
|
value: any;
|
|
419
539
|
} | {
|
|
540
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
420
541
|
type: "error-text";
|
|
421
542
|
value: string;
|
|
422
543
|
} | {
|
|
544
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
423
545
|
type: "error-json";
|
|
424
546
|
value: any;
|
|
547
|
+
} | {
|
|
548
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
549
|
+
reason?: string | undefined;
|
|
550
|
+
type: "execution-denied";
|
|
425
551
|
} | {
|
|
426
552
|
type: "content";
|
|
427
553
|
value: ({
|
|
554
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
428
555
|
type: "text";
|
|
429
556
|
text: string;
|
|
430
557
|
} | {
|
|
431
558
|
type: "media";
|
|
559
|
+
mediaType: string;
|
|
432
560
|
data: string;
|
|
561
|
+
} | {
|
|
562
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
563
|
+
filename?: string | undefined;
|
|
564
|
+
type: "file-data";
|
|
433
565
|
mediaType: string;
|
|
566
|
+
data: string;
|
|
567
|
+
} | {
|
|
568
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
569
|
+
type: "file-url";
|
|
570
|
+
url: string;
|
|
571
|
+
} | {
|
|
572
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
573
|
+
type: "file-id";
|
|
574
|
+
fileId: string | Record<string, string>;
|
|
575
|
+
} | {
|
|
576
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
577
|
+
type: "image-data";
|
|
578
|
+
mediaType: string;
|
|
579
|
+
data: string;
|
|
580
|
+
} | {
|
|
581
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
582
|
+
type: "image-url";
|
|
583
|
+
url: string;
|
|
584
|
+
} | {
|
|
585
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
586
|
+
type: "image-file-id";
|
|
587
|
+
fileId: string | Record<string, string>;
|
|
588
|
+
} | {
|
|
589
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
590
|
+
type: "custom";
|
|
434
591
|
})[];
|
|
435
592
|
} | undefined;
|
|
436
593
|
result?: any;
|
|
@@ -452,8 +609,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
452
609
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
453
610
|
id: string;
|
|
454
611
|
type: "source";
|
|
455
|
-
sourceType: "url";
|
|
456
612
|
url: string;
|
|
613
|
+
sourceType: "url";
|
|
457
614
|
} | {
|
|
458
615
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
459
616
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -463,36 +620,81 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
463
620
|
type: "source";
|
|
464
621
|
mediaType: string;
|
|
465
622
|
sourceType: "document";
|
|
623
|
+
} | {
|
|
624
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
625
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
626
|
+
type: "tool-approval-request";
|
|
627
|
+
toolCallId: string;
|
|
628
|
+
approvalId: string;
|
|
466
629
|
})[];
|
|
467
630
|
} | {
|
|
468
631
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
469
632
|
role: "tool";
|
|
470
|
-
content: {
|
|
633
|
+
content: ({
|
|
471
634
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
472
635
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
473
636
|
args?: any;
|
|
474
637
|
providerExecuted?: boolean | undefined;
|
|
475
638
|
output?: {
|
|
639
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
476
640
|
type: "text";
|
|
477
641
|
value: string;
|
|
478
642
|
} | {
|
|
643
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
479
644
|
type: "json";
|
|
480
645
|
value: any;
|
|
481
646
|
} | {
|
|
647
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
482
648
|
type: "error-text";
|
|
483
649
|
value: string;
|
|
484
650
|
} | {
|
|
651
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
485
652
|
type: "error-json";
|
|
486
653
|
value: any;
|
|
654
|
+
} | {
|
|
655
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
656
|
+
reason?: string | undefined;
|
|
657
|
+
type: "execution-denied";
|
|
487
658
|
} | {
|
|
488
659
|
type: "content";
|
|
489
660
|
value: ({
|
|
661
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
490
662
|
type: "text";
|
|
491
663
|
text: string;
|
|
492
664
|
} | {
|
|
493
665
|
type: "media";
|
|
666
|
+
mediaType: string;
|
|
494
667
|
data: string;
|
|
668
|
+
} | {
|
|
669
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
670
|
+
filename?: string | undefined;
|
|
671
|
+
type: "file-data";
|
|
495
672
|
mediaType: string;
|
|
673
|
+
data: string;
|
|
674
|
+
} | {
|
|
675
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
676
|
+
type: "file-url";
|
|
677
|
+
url: string;
|
|
678
|
+
} | {
|
|
679
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
680
|
+
type: "file-id";
|
|
681
|
+
fileId: string | Record<string, string>;
|
|
682
|
+
} | {
|
|
683
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
684
|
+
type: "image-data";
|
|
685
|
+
mediaType: string;
|
|
686
|
+
data: string;
|
|
687
|
+
} | {
|
|
688
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
689
|
+
type: "image-url";
|
|
690
|
+
url: string;
|
|
691
|
+
} | {
|
|
692
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
693
|
+
type: "image-file-id";
|
|
694
|
+
fileId: string | Record<string, string>;
|
|
695
|
+
} | {
|
|
696
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
697
|
+
type: "custom";
|
|
496
698
|
})[];
|
|
497
699
|
} | undefined;
|
|
498
700
|
result?: any;
|
|
@@ -508,7 +710,15 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
508
710
|
type: "tool-result";
|
|
509
711
|
toolCallId: string;
|
|
510
712
|
toolName: string;
|
|
511
|
-
}
|
|
713
|
+
} | {
|
|
714
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
715
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
716
|
+
providerExecuted?: boolean | undefined;
|
|
717
|
+
reason?: string | undefined;
|
|
718
|
+
type: "tool-approval-response";
|
|
719
|
+
approvalId: string;
|
|
720
|
+
approved: boolean;
|
|
721
|
+
})[];
|
|
512
722
|
} | {
|
|
513
723
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
514
724
|
role: "system";
|
|
@@ -567,8 +777,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
567
777
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
568
778
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
569
779
|
id: string;
|
|
570
|
-
sourceType: "url";
|
|
571
780
|
url: string;
|
|
781
|
+
sourceType: "url";
|
|
572
782
|
} | {
|
|
573
783
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
574
784
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -591,7 +801,7 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
591
801
|
type: "other";
|
|
592
802
|
message: string;
|
|
593
803
|
})[] | undefined;
|
|
594
|
-
finishReason?: "
|
|
804
|
+
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
595
805
|
reasoningDetails?: ({
|
|
596
806
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
597
807
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -616,15 +826,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
616
826
|
text: string;
|
|
617
827
|
} | {
|
|
618
828
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
829
|
+
mediaType?: string | undefined;
|
|
619
830
|
mimeType?: string | undefined;
|
|
620
831
|
type: "image";
|
|
621
832
|
image: string | ArrayBuffer;
|
|
622
833
|
} | {
|
|
623
834
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
624
835
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
836
|
+
mediaType?: string | undefined;
|
|
837
|
+
mimeType?: string | undefined;
|
|
625
838
|
filename?: string | undefined;
|
|
626
839
|
type: "file";
|
|
627
|
-
mimeType: string;
|
|
628
840
|
data: string | ArrayBuffer;
|
|
629
841
|
})[];
|
|
630
842
|
} | {
|
|
@@ -638,9 +850,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
638
850
|
} | {
|
|
639
851
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
640
852
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
853
|
+
mediaType?: string | undefined;
|
|
854
|
+
mimeType?: string | undefined;
|
|
641
855
|
filename?: string | undefined;
|
|
642
856
|
type: "file";
|
|
643
|
-
mimeType: string;
|
|
644
857
|
data: string | ArrayBuffer;
|
|
645
858
|
} | {
|
|
646
859
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -656,6 +869,16 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
656
869
|
} | {
|
|
657
870
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
658
871
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
872
|
+
args?: any;
|
|
873
|
+
providerExecuted?: boolean | undefined;
|
|
874
|
+
type: "tool-call";
|
|
875
|
+
toolCallId: string;
|
|
876
|
+
toolName: string;
|
|
877
|
+
input: any;
|
|
878
|
+
} | {
|
|
879
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
880
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
881
|
+
input?: any;
|
|
659
882
|
providerExecuted?: boolean | undefined;
|
|
660
883
|
type: "tool-call";
|
|
661
884
|
toolCallId: string;
|
|
@@ -667,26 +890,65 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
667
890
|
args?: any;
|
|
668
891
|
providerExecuted?: boolean | undefined;
|
|
669
892
|
output?: {
|
|
893
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
670
894
|
type: "text";
|
|
671
895
|
value: string;
|
|
672
896
|
} | {
|
|
897
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
673
898
|
type: "json";
|
|
674
899
|
value: any;
|
|
675
900
|
} | {
|
|
901
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
676
902
|
type: "error-text";
|
|
677
903
|
value: string;
|
|
678
904
|
} | {
|
|
905
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
679
906
|
type: "error-json";
|
|
680
907
|
value: any;
|
|
908
|
+
} | {
|
|
909
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
910
|
+
reason?: string | undefined;
|
|
911
|
+
type: "execution-denied";
|
|
681
912
|
} | {
|
|
682
913
|
type: "content";
|
|
683
914
|
value: ({
|
|
915
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
684
916
|
type: "text";
|
|
685
917
|
text: string;
|
|
686
918
|
} | {
|
|
687
919
|
type: "media";
|
|
920
|
+
mediaType: string;
|
|
688
921
|
data: string;
|
|
922
|
+
} | {
|
|
923
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
924
|
+
filename?: string | undefined;
|
|
925
|
+
type: "file-data";
|
|
689
926
|
mediaType: string;
|
|
927
|
+
data: string;
|
|
928
|
+
} | {
|
|
929
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
930
|
+
type: "file-url";
|
|
931
|
+
url: string;
|
|
932
|
+
} | {
|
|
933
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
934
|
+
type: "file-id";
|
|
935
|
+
fileId: string | Record<string, string>;
|
|
936
|
+
} | {
|
|
937
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
938
|
+
type: "image-data";
|
|
939
|
+
mediaType: string;
|
|
940
|
+
data: string;
|
|
941
|
+
} | {
|
|
942
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
943
|
+
type: "image-url";
|
|
944
|
+
url: string;
|
|
945
|
+
} | {
|
|
946
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
947
|
+
type: "image-file-id";
|
|
948
|
+
fileId: string | Record<string, string>;
|
|
949
|
+
} | {
|
|
950
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
951
|
+
type: "custom";
|
|
690
952
|
})[];
|
|
691
953
|
} | undefined;
|
|
692
954
|
result?: any;
|
|
@@ -708,8 +970,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
708
970
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
709
971
|
id: string;
|
|
710
972
|
type: "source";
|
|
711
|
-
sourceType: "url";
|
|
712
973
|
url: string;
|
|
974
|
+
sourceType: "url";
|
|
713
975
|
} | {
|
|
714
976
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
715
977
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -719,36 +981,81 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
719
981
|
type: "source";
|
|
720
982
|
mediaType: string;
|
|
721
983
|
sourceType: "document";
|
|
984
|
+
} | {
|
|
985
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
986
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
987
|
+
type: "tool-approval-request";
|
|
988
|
+
toolCallId: string;
|
|
989
|
+
approvalId: string;
|
|
722
990
|
})[];
|
|
723
991
|
} | {
|
|
724
992
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
725
993
|
role: "tool";
|
|
726
|
-
content: {
|
|
994
|
+
content: ({
|
|
727
995
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
728
996
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
729
997
|
args?: any;
|
|
730
998
|
providerExecuted?: boolean | undefined;
|
|
731
999
|
output?: {
|
|
1000
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
732
1001
|
type: "text";
|
|
733
1002
|
value: string;
|
|
734
1003
|
} | {
|
|
1004
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
735
1005
|
type: "json";
|
|
736
1006
|
value: any;
|
|
737
1007
|
} | {
|
|
1008
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
738
1009
|
type: "error-text";
|
|
739
1010
|
value: string;
|
|
740
1011
|
} | {
|
|
1012
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
741
1013
|
type: "error-json";
|
|
742
1014
|
value: any;
|
|
1015
|
+
} | {
|
|
1016
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1017
|
+
reason?: string | undefined;
|
|
1018
|
+
type: "execution-denied";
|
|
743
1019
|
} | {
|
|
744
1020
|
type: "content";
|
|
745
1021
|
value: ({
|
|
1022
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
746
1023
|
type: "text";
|
|
747
1024
|
text: string;
|
|
748
1025
|
} | {
|
|
749
1026
|
type: "media";
|
|
1027
|
+
mediaType: string;
|
|
750
1028
|
data: string;
|
|
1029
|
+
} | {
|
|
1030
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1031
|
+
filename?: string | undefined;
|
|
1032
|
+
type: "file-data";
|
|
1033
|
+
mediaType: string;
|
|
1034
|
+
data: string;
|
|
1035
|
+
} | {
|
|
1036
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1037
|
+
type: "file-url";
|
|
1038
|
+
url: string;
|
|
1039
|
+
} | {
|
|
1040
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1041
|
+
type: "file-id";
|
|
1042
|
+
fileId: string | Record<string, string>;
|
|
1043
|
+
} | {
|
|
1044
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1045
|
+
type: "image-data";
|
|
751
1046
|
mediaType: string;
|
|
1047
|
+
data: string;
|
|
1048
|
+
} | {
|
|
1049
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1050
|
+
type: "image-url";
|
|
1051
|
+
url: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1054
|
+
type: "image-file-id";
|
|
1055
|
+
fileId: string | Record<string, string>;
|
|
1056
|
+
} | {
|
|
1057
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1058
|
+
type: "custom";
|
|
752
1059
|
})[];
|
|
753
1060
|
} | undefined;
|
|
754
1061
|
result?: any;
|
|
@@ -764,7 +1071,15 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
764
1071
|
type: "tool-result";
|
|
765
1072
|
toolCallId: string;
|
|
766
1073
|
toolName: string;
|
|
767
|
-
}
|
|
1074
|
+
} | {
|
|
1075
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1076
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1077
|
+
providerExecuted?: boolean | undefined;
|
|
1078
|
+
reason?: string | undefined;
|
|
1079
|
+
type: "tool-approval-response";
|
|
1080
|
+
approvalId: string;
|
|
1081
|
+
approved: boolean;
|
|
1082
|
+
})[];
|
|
768
1083
|
} | {
|
|
769
1084
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
770
1085
|
role: "system";
|
|
@@ -785,15 +1100,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
785
1100
|
text: string;
|
|
786
1101
|
} | {
|
|
787
1102
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1103
|
+
mediaType?: string | undefined;
|
|
788
1104
|
mimeType?: string | undefined;
|
|
789
1105
|
type: "image";
|
|
790
1106
|
image: string | ArrayBuffer;
|
|
791
1107
|
} | {
|
|
792
1108
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
793
1109
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1110
|
+
mediaType?: string | undefined;
|
|
1111
|
+
mimeType?: string | undefined;
|
|
794
1112
|
filename?: string | undefined;
|
|
795
1113
|
type: "file";
|
|
796
|
-
mimeType: string;
|
|
797
1114
|
data: string | ArrayBuffer;
|
|
798
1115
|
})[];
|
|
799
1116
|
} | {
|
|
@@ -807,9 +1124,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
807
1124
|
} | {
|
|
808
1125
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
809
1126
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1127
|
+
mediaType?: string | undefined;
|
|
1128
|
+
mimeType?: string | undefined;
|
|
810
1129
|
filename?: string | undefined;
|
|
811
1130
|
type: "file";
|
|
812
|
-
mimeType: string;
|
|
813
1131
|
data: string | ArrayBuffer;
|
|
814
1132
|
} | {
|
|
815
1133
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -825,6 +1143,16 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
825
1143
|
} | {
|
|
826
1144
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
827
1145
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1146
|
+
args?: any;
|
|
1147
|
+
providerExecuted?: boolean | undefined;
|
|
1148
|
+
type: "tool-call";
|
|
1149
|
+
toolCallId: string;
|
|
1150
|
+
toolName: string;
|
|
1151
|
+
input: any;
|
|
1152
|
+
} | {
|
|
1153
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1154
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1155
|
+
input?: any;
|
|
828
1156
|
providerExecuted?: boolean | undefined;
|
|
829
1157
|
type: "tool-call";
|
|
830
1158
|
toolCallId: string;
|
|
@@ -836,26 +1164,65 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
836
1164
|
args?: any;
|
|
837
1165
|
providerExecuted?: boolean | undefined;
|
|
838
1166
|
output?: {
|
|
1167
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
839
1168
|
type: "text";
|
|
840
1169
|
value: string;
|
|
841
1170
|
} | {
|
|
1171
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
842
1172
|
type: "json";
|
|
843
1173
|
value: any;
|
|
844
1174
|
} | {
|
|
1175
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
845
1176
|
type: "error-text";
|
|
846
1177
|
value: string;
|
|
847
1178
|
} | {
|
|
1179
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
848
1180
|
type: "error-json";
|
|
849
1181
|
value: any;
|
|
1182
|
+
} | {
|
|
1183
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1184
|
+
reason?: string | undefined;
|
|
1185
|
+
type: "execution-denied";
|
|
850
1186
|
} | {
|
|
851
1187
|
type: "content";
|
|
852
1188
|
value: ({
|
|
1189
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
853
1190
|
type: "text";
|
|
854
1191
|
text: string;
|
|
855
1192
|
} | {
|
|
856
1193
|
type: "media";
|
|
1194
|
+
mediaType: string;
|
|
857
1195
|
data: string;
|
|
1196
|
+
} | {
|
|
1197
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1198
|
+
filename?: string | undefined;
|
|
1199
|
+
type: "file-data";
|
|
858
1200
|
mediaType: string;
|
|
1201
|
+
data: string;
|
|
1202
|
+
} | {
|
|
1203
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1204
|
+
type: "file-url";
|
|
1205
|
+
url: string;
|
|
1206
|
+
} | {
|
|
1207
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1208
|
+
type: "file-id";
|
|
1209
|
+
fileId: string | Record<string, string>;
|
|
1210
|
+
} | {
|
|
1211
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1212
|
+
type: "image-data";
|
|
1213
|
+
mediaType: string;
|
|
1214
|
+
data: string;
|
|
1215
|
+
} | {
|
|
1216
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1217
|
+
type: "image-url";
|
|
1218
|
+
url: string;
|
|
1219
|
+
} | {
|
|
1220
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1221
|
+
type: "image-file-id";
|
|
1222
|
+
fileId: string | Record<string, string>;
|
|
1223
|
+
} | {
|
|
1224
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1225
|
+
type: "custom";
|
|
859
1226
|
})[];
|
|
860
1227
|
} | undefined;
|
|
861
1228
|
result?: any;
|
|
@@ -877,8 +1244,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
877
1244
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
878
1245
|
id: string;
|
|
879
1246
|
type: "source";
|
|
880
|
-
sourceType: "url";
|
|
881
1247
|
url: string;
|
|
1248
|
+
sourceType: "url";
|
|
882
1249
|
} | {
|
|
883
1250
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
884
1251
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -888,36 +1255,81 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
888
1255
|
type: "source";
|
|
889
1256
|
mediaType: string;
|
|
890
1257
|
sourceType: "document";
|
|
1258
|
+
} | {
|
|
1259
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1260
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1261
|
+
type: "tool-approval-request";
|
|
1262
|
+
toolCallId: string;
|
|
1263
|
+
approvalId: string;
|
|
891
1264
|
})[];
|
|
892
1265
|
} | {
|
|
893
1266
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
894
1267
|
role: "tool";
|
|
895
|
-
content: {
|
|
1268
|
+
content: ({
|
|
896
1269
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
897
1270
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
898
1271
|
args?: any;
|
|
899
1272
|
providerExecuted?: boolean | undefined;
|
|
900
1273
|
output?: {
|
|
1274
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
901
1275
|
type: "text";
|
|
902
1276
|
value: string;
|
|
903
1277
|
} | {
|
|
1278
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
904
1279
|
type: "json";
|
|
905
1280
|
value: any;
|
|
906
1281
|
} | {
|
|
1282
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
907
1283
|
type: "error-text";
|
|
908
1284
|
value: string;
|
|
909
1285
|
} | {
|
|
1286
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
910
1287
|
type: "error-json";
|
|
911
1288
|
value: any;
|
|
1289
|
+
} | {
|
|
1290
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1291
|
+
reason?: string | undefined;
|
|
1292
|
+
type: "execution-denied";
|
|
912
1293
|
} | {
|
|
913
1294
|
type: "content";
|
|
914
1295
|
value: ({
|
|
1296
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
915
1297
|
type: "text";
|
|
916
1298
|
text: string;
|
|
917
1299
|
} | {
|
|
918
1300
|
type: "media";
|
|
1301
|
+
mediaType: string;
|
|
919
1302
|
data: string;
|
|
1303
|
+
} | {
|
|
1304
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1305
|
+
filename?: string | undefined;
|
|
1306
|
+
type: "file-data";
|
|
920
1307
|
mediaType: string;
|
|
1308
|
+
data: string;
|
|
1309
|
+
} | {
|
|
1310
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1311
|
+
type: "file-url";
|
|
1312
|
+
url: string;
|
|
1313
|
+
} | {
|
|
1314
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1315
|
+
type: "file-id";
|
|
1316
|
+
fileId: string | Record<string, string>;
|
|
1317
|
+
} | {
|
|
1318
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1319
|
+
type: "image-data";
|
|
1320
|
+
mediaType: string;
|
|
1321
|
+
data: string;
|
|
1322
|
+
} | {
|
|
1323
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1324
|
+
type: "image-url";
|
|
1325
|
+
url: string;
|
|
1326
|
+
} | {
|
|
1327
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1328
|
+
type: "image-file-id";
|
|
1329
|
+
fileId: string | Record<string, string>;
|
|
1330
|
+
} | {
|
|
1331
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1332
|
+
type: "custom";
|
|
921
1333
|
})[];
|
|
922
1334
|
} | undefined;
|
|
923
1335
|
result?: any;
|
|
@@ -933,7 +1345,15 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
933
1345
|
type: "tool-result";
|
|
934
1346
|
toolCallId: string;
|
|
935
1347
|
toolName: string;
|
|
936
|
-
}
|
|
1348
|
+
} | {
|
|
1349
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1350
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1351
|
+
providerExecuted?: boolean | undefined;
|
|
1352
|
+
reason?: string | undefined;
|
|
1353
|
+
type: "tool-approval-response";
|
|
1354
|
+
approvalId: string;
|
|
1355
|
+
approved: boolean;
|
|
1356
|
+
})[];
|
|
937
1357
|
} | {
|
|
938
1358
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
939
1359
|
role: "system";
|
|
@@ -979,15 +1399,17 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
979
1399
|
text: string;
|
|
980
1400
|
} | {
|
|
981
1401
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1402
|
+
mediaType?: string | undefined;
|
|
982
1403
|
mimeType?: string | undefined;
|
|
983
1404
|
type: "image";
|
|
984
1405
|
image: string | ArrayBuffer;
|
|
985
1406
|
} | {
|
|
986
1407
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
987
1408
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1409
|
+
mediaType?: string | undefined;
|
|
1410
|
+
mimeType?: string | undefined;
|
|
988
1411
|
filename?: string | undefined;
|
|
989
1412
|
type: "file";
|
|
990
|
-
mimeType: string;
|
|
991
1413
|
data: string | ArrayBuffer;
|
|
992
1414
|
})[];
|
|
993
1415
|
} | {
|
|
@@ -1001,9 +1423,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1001
1423
|
} | {
|
|
1002
1424
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1003
1425
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1426
|
+
mediaType?: string | undefined;
|
|
1427
|
+
mimeType?: string | undefined;
|
|
1004
1428
|
filename?: string | undefined;
|
|
1005
1429
|
type: "file";
|
|
1006
|
-
mimeType: string;
|
|
1007
1430
|
data: string | ArrayBuffer;
|
|
1008
1431
|
} | {
|
|
1009
1432
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1019,6 +1442,16 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1019
1442
|
} | {
|
|
1020
1443
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1021
1444
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1445
|
+
args?: any;
|
|
1446
|
+
providerExecuted?: boolean | undefined;
|
|
1447
|
+
type: "tool-call";
|
|
1448
|
+
toolCallId: string;
|
|
1449
|
+
toolName: string;
|
|
1450
|
+
input: any;
|
|
1451
|
+
} | {
|
|
1452
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1453
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1454
|
+
input?: any;
|
|
1022
1455
|
providerExecuted?: boolean | undefined;
|
|
1023
1456
|
type: "tool-call";
|
|
1024
1457
|
toolCallId: string;
|
|
@@ -1030,26 +1463,65 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1030
1463
|
args?: any;
|
|
1031
1464
|
providerExecuted?: boolean | undefined;
|
|
1032
1465
|
output?: {
|
|
1466
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1033
1467
|
type: "text";
|
|
1034
1468
|
value: string;
|
|
1035
1469
|
} | {
|
|
1470
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1036
1471
|
type: "json";
|
|
1037
1472
|
value: any;
|
|
1038
1473
|
} | {
|
|
1474
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1039
1475
|
type: "error-text";
|
|
1040
1476
|
value: string;
|
|
1041
1477
|
} | {
|
|
1478
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1042
1479
|
type: "error-json";
|
|
1043
1480
|
value: any;
|
|
1481
|
+
} | {
|
|
1482
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1483
|
+
reason?: string | undefined;
|
|
1484
|
+
type: "execution-denied";
|
|
1044
1485
|
} | {
|
|
1045
1486
|
type: "content";
|
|
1046
1487
|
value: ({
|
|
1488
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1047
1489
|
type: "text";
|
|
1048
1490
|
text: string;
|
|
1049
1491
|
} | {
|
|
1050
1492
|
type: "media";
|
|
1493
|
+
mediaType: string;
|
|
1051
1494
|
data: string;
|
|
1495
|
+
} | {
|
|
1496
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1497
|
+
filename?: string | undefined;
|
|
1498
|
+
type: "file-data";
|
|
1052
1499
|
mediaType: string;
|
|
1500
|
+
data: string;
|
|
1501
|
+
} | {
|
|
1502
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1503
|
+
type: "file-url";
|
|
1504
|
+
url: string;
|
|
1505
|
+
} | {
|
|
1506
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1507
|
+
type: "file-id";
|
|
1508
|
+
fileId: string | Record<string, string>;
|
|
1509
|
+
} | {
|
|
1510
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1511
|
+
type: "image-data";
|
|
1512
|
+
mediaType: string;
|
|
1513
|
+
data: string;
|
|
1514
|
+
} | {
|
|
1515
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1516
|
+
type: "image-url";
|
|
1517
|
+
url: string;
|
|
1518
|
+
} | {
|
|
1519
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1520
|
+
type: "image-file-id";
|
|
1521
|
+
fileId: string | Record<string, string>;
|
|
1522
|
+
} | {
|
|
1523
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1524
|
+
type: "custom";
|
|
1053
1525
|
})[];
|
|
1054
1526
|
} | undefined;
|
|
1055
1527
|
result?: any;
|
|
@@ -1071,8 +1543,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1071
1543
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1072
1544
|
id: string;
|
|
1073
1545
|
type: "source";
|
|
1074
|
-
sourceType: "url";
|
|
1075
1546
|
url: string;
|
|
1547
|
+
sourceType: "url";
|
|
1076
1548
|
} | {
|
|
1077
1549
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1078
1550
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1082,36 +1554,81 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1082
1554
|
type: "source";
|
|
1083
1555
|
mediaType: string;
|
|
1084
1556
|
sourceType: "document";
|
|
1557
|
+
} | {
|
|
1558
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1559
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1560
|
+
type: "tool-approval-request";
|
|
1561
|
+
toolCallId: string;
|
|
1562
|
+
approvalId: string;
|
|
1085
1563
|
})[];
|
|
1086
1564
|
} | {
|
|
1087
1565
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1088
1566
|
role: "tool";
|
|
1089
|
-
content: {
|
|
1567
|
+
content: ({
|
|
1090
1568
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1091
1569
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1092
1570
|
args?: any;
|
|
1093
1571
|
providerExecuted?: boolean | undefined;
|
|
1094
1572
|
output?: {
|
|
1573
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1095
1574
|
type: "text";
|
|
1096
1575
|
value: string;
|
|
1097
1576
|
} | {
|
|
1577
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1098
1578
|
type: "json";
|
|
1099
1579
|
value: any;
|
|
1100
1580
|
} | {
|
|
1581
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1101
1582
|
type: "error-text";
|
|
1102
1583
|
value: string;
|
|
1103
1584
|
} | {
|
|
1585
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1104
1586
|
type: "error-json";
|
|
1105
1587
|
value: any;
|
|
1588
|
+
} | {
|
|
1589
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1590
|
+
reason?: string | undefined;
|
|
1591
|
+
type: "execution-denied";
|
|
1106
1592
|
} | {
|
|
1107
1593
|
type: "content";
|
|
1108
1594
|
value: ({
|
|
1595
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1109
1596
|
type: "text";
|
|
1110
1597
|
text: string;
|
|
1111
1598
|
} | {
|
|
1112
1599
|
type: "media";
|
|
1600
|
+
mediaType: string;
|
|
1601
|
+
data: string;
|
|
1602
|
+
} | {
|
|
1603
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1604
|
+
filename?: string | undefined;
|
|
1605
|
+
type: "file-data";
|
|
1606
|
+
mediaType: string;
|
|
1113
1607
|
data: string;
|
|
1608
|
+
} | {
|
|
1609
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1610
|
+
type: "file-url";
|
|
1611
|
+
url: string;
|
|
1612
|
+
} | {
|
|
1613
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1614
|
+
type: "file-id";
|
|
1615
|
+
fileId: string | Record<string, string>;
|
|
1616
|
+
} | {
|
|
1617
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1618
|
+
type: "image-data";
|
|
1114
1619
|
mediaType: string;
|
|
1620
|
+
data: string;
|
|
1621
|
+
} | {
|
|
1622
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1623
|
+
type: "image-url";
|
|
1624
|
+
url: string;
|
|
1625
|
+
} | {
|
|
1626
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1627
|
+
type: "image-file-id";
|
|
1628
|
+
fileId: string | Record<string, string>;
|
|
1629
|
+
} | {
|
|
1630
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1631
|
+
type: "custom";
|
|
1115
1632
|
})[];
|
|
1116
1633
|
} | undefined;
|
|
1117
1634
|
result?: any;
|
|
@@ -1127,7 +1644,15 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1127
1644
|
type: "tool-result";
|
|
1128
1645
|
toolCallId: string;
|
|
1129
1646
|
toolName: string;
|
|
1130
|
-
}
|
|
1647
|
+
} | {
|
|
1648
|
+
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1649
|
+
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1650
|
+
providerExecuted?: boolean | undefined;
|
|
1651
|
+
reason?: string | undefined;
|
|
1652
|
+
type: "tool-approval-response";
|
|
1653
|
+
approvalId: string;
|
|
1654
|
+
approved: boolean;
|
|
1655
|
+
})[];
|
|
1131
1656
|
} | {
|
|
1132
1657
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1133
1658
|
role: "system";
|
|
@@ -1149,8 +1674,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1149
1674
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1150
1675
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
1151
1676
|
id: string;
|
|
1152
|
-
sourceType: "url";
|
|
1153
1677
|
url: string;
|
|
1678
|
+
sourceType: "url";
|
|
1154
1679
|
} | {
|
|
1155
1680
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1156
1681
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1173,7 +1698,7 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1173
1698
|
type: "other";
|
|
1174
1699
|
message: string;
|
|
1175
1700
|
})[] | undefined;
|
|
1176
|
-
finishReason?: "
|
|
1701
|
+
finishReason?: "error" | "length" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
|
|
1177
1702
|
reasoningDetails?: ({
|
|
1178
1703
|
providerOptions?: Record<string, Record<string, any>> | undefined;
|
|
1179
1704
|
providerMetadata?: Record<string, Record<string, any>> | undefined;
|
|
@@ -1188,13 +1713,13 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
|
|
|
1188
1713
|
type: "redacted";
|
|
1189
1714
|
data: string;
|
|
1190
1715
|
})[] | undefined;
|
|
1191
|
-
_id: string;
|
|
1192
|
-
_creationTime: number;
|
|
1193
1716
|
status: "pending" | "success" | "failed";
|
|
1194
1717
|
order: number;
|
|
1718
|
+
_creationTime: number;
|
|
1195
1719
|
threadId: string;
|
|
1196
1720
|
stepOrder: number;
|
|
1197
1721
|
tool: boolean;
|
|
1722
|
+
_id: string;
|
|
1198
1723
|
}[]>>;
|
|
1199
1724
|
};
|
|
1200
1725
|
//# sourceMappingURL=definePlaygroundAPI.d.ts.map
|