@assistant-ui/react 0.5.46 → 0.5.47
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{chunk-BQ3MRWUV.js → chunk-BNSCUYW7.js} +9 -5
- package/dist/chunk-BNSCUYW7.js.map +1 -0
- package/dist/{chunk-5ZTUOAPH.mjs → chunk-TZO3D3VQ.mjs} +9 -5
- package/dist/chunk-TZO3D3VQ.mjs.map +1 -0
- package/dist/{edge-6dYzFCV5.d.mts → edge-Dwfu6YTG.d.mts} +16 -1
- package/dist/{edge-6dYzFCV5.d.ts → edge-Dwfu6YTG.d.ts} +16 -1
- package/dist/edge.d.mts +75 -75
- package/dist/edge.d.ts +75 -75
- package/dist/edge.js +8 -4
- package/dist/edge.js.map +1 -1
- package/dist/edge.mjs +8 -4
- package/dist/edge.mjs.map +1 -1
- package/dist/index.d.mts +189 -58
- package/dist/index.d.ts +189 -58
- package/dist/index.js +828 -231
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +888 -291
- package/dist/index.mjs.map +1 -1
- package/dist/styles/index.css +54 -3
- package/dist/styles/index.css.map +1 -1
- package/dist/styles/tailwindcss/thread.css +32 -4
- package/package.json +3 -3
- package/dist/chunk-5ZTUOAPH.mjs.map +0 -1
- package/dist/chunk-BQ3MRWUV.js.map +0 -1
package/dist/edge.d.mts
CHANGED
@@ -2,6 +2,55 @@ import { LanguageModelV1LogProbs, LanguageModelV1, LanguageModelV1ToolChoice } f
|
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
3
3
|
import { z } from 'zod';
|
4
4
|
|
5
|
+
declare const LanguageModelV1CallSettingsSchema: z.ZodObject<{
|
6
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
7
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
8
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
9
|
+
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
10
|
+
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
11
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
12
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
14
|
+
maxTokens?: number | undefined;
|
15
|
+
temperature?: number | undefined;
|
16
|
+
topP?: number | undefined;
|
17
|
+
presencePenalty?: number | undefined;
|
18
|
+
frequencyPenalty?: number | undefined;
|
19
|
+
seed?: number | undefined;
|
20
|
+
headers?: Record<string, string | undefined> | undefined;
|
21
|
+
}, {
|
22
|
+
maxTokens?: number | undefined;
|
23
|
+
temperature?: number | undefined;
|
24
|
+
topP?: number | undefined;
|
25
|
+
presencePenalty?: number | undefined;
|
26
|
+
frequencyPenalty?: number | undefined;
|
27
|
+
seed?: number | undefined;
|
28
|
+
headers?: Record<string, string | undefined> | undefined;
|
29
|
+
}>;
|
30
|
+
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
31
|
+
declare const LanguageModelConfigSchema: z.ZodObject<{
|
32
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
33
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
34
|
+
modelName: z.ZodOptional<z.ZodString>;
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
36
|
+
apiKey?: string | undefined;
|
37
|
+
baseUrl?: string | undefined;
|
38
|
+
modelName?: string | undefined;
|
39
|
+
}, {
|
40
|
+
apiKey?: string | undefined;
|
41
|
+
baseUrl?: string | undefined;
|
42
|
+
modelName?: string | undefined;
|
43
|
+
}>;
|
44
|
+
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
45
|
+
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs, context: {
|
46
|
+
abortSignal: AbortSignal;
|
47
|
+
}) => TResult | Promise<TResult>;
|
48
|
+
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
49
|
+
description?: string | undefined;
|
50
|
+
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
51
|
+
execute?: ToolExecuteFunction<TArgs, TResult>;
|
52
|
+
};
|
53
|
+
|
5
54
|
type TextContentPart = {
|
6
55
|
type: "text";
|
7
56
|
text: string;
|
@@ -50,23 +99,23 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
50
99
|
type: z.ZodLiteral<"text">;
|
51
100
|
text: z.ZodString;
|
52
101
|
}, "strip", z.ZodTypeAny, {
|
53
|
-
text: string;
|
54
102
|
type: "text";
|
55
|
-
}, {
|
56
103
|
text: string;
|
104
|
+
}, {
|
57
105
|
type: "text";
|
106
|
+
text: string;
|
58
107
|
}>], null>;
|
59
108
|
}, "strip", z.ZodTypeAny, {
|
60
109
|
role: "system";
|
61
110
|
content: [{
|
62
|
-
text: string;
|
63
111
|
type: "text";
|
112
|
+
text: string;
|
64
113
|
}];
|
65
114
|
}, {
|
66
115
|
role: "system";
|
67
116
|
content: [{
|
68
|
-
text: string;
|
69
117
|
type: "text";
|
118
|
+
text: string;
|
70
119
|
}];
|
71
120
|
}>, z.ZodObject<{
|
72
121
|
role: z.ZodLiteral<"user">;
|
@@ -74,38 +123,38 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
74
123
|
type: z.ZodLiteral<"text">;
|
75
124
|
text: z.ZodString;
|
76
125
|
}, "strip", z.ZodTypeAny, {
|
77
|
-
text: string;
|
78
126
|
type: "text";
|
79
|
-
}, {
|
80
127
|
text: string;
|
128
|
+
}, {
|
81
129
|
type: "text";
|
130
|
+
text: string;
|
82
131
|
}>, z.ZodObject<{
|
83
132
|
type: z.ZodLiteral<"image">;
|
84
133
|
image: z.ZodString;
|
85
134
|
}, "strip", z.ZodTypeAny, {
|
86
|
-
image: string;
|
87
135
|
type: "image";
|
88
|
-
}, {
|
89
136
|
image: string;
|
137
|
+
}, {
|
90
138
|
type: "image";
|
139
|
+
image: string;
|
91
140
|
}>]>, "many">;
|
92
141
|
}, "strip", z.ZodTypeAny, {
|
93
142
|
role: "user";
|
94
143
|
content: ({
|
95
|
-
text: string;
|
96
144
|
type: "text";
|
145
|
+
text: string;
|
97
146
|
} | {
|
98
|
-
image: string;
|
99
147
|
type: "image";
|
148
|
+
image: string;
|
100
149
|
})[];
|
101
150
|
}, {
|
102
151
|
role: "user";
|
103
152
|
content: ({
|
104
|
-
text: string;
|
105
153
|
type: "text";
|
154
|
+
text: string;
|
106
155
|
} | {
|
107
|
-
image: string;
|
108
156
|
type: "image";
|
157
|
+
image: string;
|
109
158
|
})[];
|
110
159
|
}>, z.ZodObject<{
|
111
160
|
role: z.ZodLiteral<"assistant">;
|
@@ -113,11 +162,11 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
113
162
|
type: z.ZodLiteral<"text">;
|
114
163
|
text: z.ZodString;
|
115
164
|
}, "strip", z.ZodTypeAny, {
|
116
|
-
text: string;
|
117
165
|
type: "text";
|
118
|
-
}, {
|
119
166
|
text: string;
|
167
|
+
}, {
|
120
168
|
type: "text";
|
169
|
+
text: string;
|
121
170
|
}>, z.ZodObject<{
|
122
171
|
type: z.ZodLiteral<"tool-call">;
|
123
172
|
toolCallId: z.ZodString;
|
@@ -143,8 +192,8 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
143
192
|
}, "strip", z.ZodTypeAny, {
|
144
193
|
role: "assistant";
|
145
194
|
content: ({
|
146
|
-
text: string;
|
147
195
|
type: "text";
|
196
|
+
text: string;
|
148
197
|
} | {
|
149
198
|
type: "tool-call";
|
150
199
|
toolCallId: string;
|
@@ -156,8 +205,8 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
156
205
|
}, {
|
157
206
|
role: "assistant";
|
158
207
|
content: ({
|
159
|
-
text: string;
|
160
208
|
type: "text";
|
209
|
+
text: string;
|
161
210
|
} | {
|
162
211
|
type: "tool-call";
|
163
212
|
toolCallId: string;
|
@@ -199,17 +248,17 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
199
248
|
messages: ({
|
200
249
|
role: "user";
|
201
250
|
content: ({
|
202
|
-
text: string;
|
203
251
|
type: "text";
|
252
|
+
text: string;
|
204
253
|
} | {
|
205
|
-
image: string;
|
206
254
|
type: "image";
|
255
|
+
image: string;
|
207
256
|
})[];
|
208
257
|
} | {
|
209
258
|
role: "assistant";
|
210
259
|
content: ({
|
211
|
-
text: string;
|
212
260
|
type: "text";
|
261
|
+
text: string;
|
213
262
|
} | {
|
214
263
|
type: "tool-call";
|
215
264
|
toolCallId: string;
|
@@ -221,11 +270,10 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
221
270
|
} | {
|
222
271
|
role: "system";
|
223
272
|
content: [{
|
224
|
-
text: string;
|
225
273
|
type: "text";
|
274
|
+
text: string;
|
226
275
|
}];
|
227
276
|
})[];
|
228
|
-
system?: string | undefined;
|
229
277
|
maxTokens?: number | undefined;
|
230
278
|
temperature?: number | undefined;
|
231
279
|
topP?: number | undefined;
|
@@ -236,6 +284,7 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
236
284
|
apiKey?: string | undefined;
|
237
285
|
baseUrl?: string | undefined;
|
238
286
|
modelName?: string | undefined;
|
287
|
+
system?: string | undefined;
|
239
288
|
tools?: {
|
240
289
|
type: "function";
|
241
290
|
name: string;
|
@@ -246,17 +295,17 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
246
295
|
messages: ({
|
247
296
|
role: "user";
|
248
297
|
content: ({
|
249
|
-
text: string;
|
250
298
|
type: "text";
|
299
|
+
text: string;
|
251
300
|
} | {
|
252
|
-
image: string;
|
253
301
|
type: "image";
|
302
|
+
image: string;
|
254
303
|
})[];
|
255
304
|
} | {
|
256
305
|
role: "assistant";
|
257
306
|
content: ({
|
258
|
-
text: string;
|
259
307
|
type: "text";
|
308
|
+
text: string;
|
260
309
|
} | {
|
261
310
|
type: "tool-call";
|
262
311
|
toolCallId: string;
|
@@ -268,11 +317,10 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
268
317
|
} | {
|
269
318
|
role: "system";
|
270
319
|
content: [{
|
271
|
-
text: string;
|
272
320
|
type: "text";
|
321
|
+
text: string;
|
273
322
|
}];
|
274
323
|
})[];
|
275
|
-
system?: string | undefined;
|
276
324
|
maxTokens?: number | undefined;
|
277
325
|
temperature?: number | undefined;
|
278
326
|
topP?: number | undefined;
|
@@ -283,6 +331,7 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
283
331
|
apiKey?: string | undefined;
|
284
332
|
baseUrl?: string | undefined;
|
285
333
|
modelName?: string | undefined;
|
334
|
+
system?: string | undefined;
|
286
335
|
tools?: {
|
287
336
|
type: "function";
|
288
337
|
name: string;
|
@@ -291,55 +340,6 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
291
340
|
}[] | undefined;
|
292
341
|
}>;
|
293
342
|
|
294
|
-
declare const LanguageModelV1CallSettingsSchema: z.ZodObject<{
|
295
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
296
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
297
|
-
topP: z.ZodOptional<z.ZodNumber>;
|
298
|
-
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
299
|
-
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
300
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
301
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
302
|
-
}, "strip", z.ZodTypeAny, {
|
303
|
-
maxTokens?: number | undefined;
|
304
|
-
temperature?: number | undefined;
|
305
|
-
topP?: number | undefined;
|
306
|
-
presencePenalty?: number | undefined;
|
307
|
-
frequencyPenalty?: number | undefined;
|
308
|
-
seed?: number | undefined;
|
309
|
-
headers?: Record<string, string | undefined> | undefined;
|
310
|
-
}, {
|
311
|
-
maxTokens?: number | undefined;
|
312
|
-
temperature?: number | undefined;
|
313
|
-
topP?: number | undefined;
|
314
|
-
presencePenalty?: number | undefined;
|
315
|
-
frequencyPenalty?: number | undefined;
|
316
|
-
seed?: number | undefined;
|
317
|
-
headers?: Record<string, string | undefined> | undefined;
|
318
|
-
}>;
|
319
|
-
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
320
|
-
declare const LanguageModelConfigSchema: z.ZodObject<{
|
321
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
322
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
323
|
-
modelName: z.ZodOptional<z.ZodString>;
|
324
|
-
}, "strip", z.ZodTypeAny, {
|
325
|
-
apiKey?: string | undefined;
|
326
|
-
baseUrl?: string | undefined;
|
327
|
-
modelName?: string | undefined;
|
328
|
-
}, {
|
329
|
-
apiKey?: string | undefined;
|
330
|
-
baseUrl?: string | undefined;
|
331
|
-
modelName?: string | undefined;
|
332
|
-
}>;
|
333
|
-
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
334
|
-
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs, context: {
|
335
|
-
abortSignal: AbortSignal;
|
336
|
-
}) => TResult | Promise<TResult>;
|
337
|
-
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
338
|
-
description?: string | undefined;
|
339
|
-
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
340
|
-
execute?: ToolExecuteFunction<TArgs, TResult>;
|
341
|
-
};
|
342
|
-
|
343
343
|
type FinishResult = {
|
344
344
|
messages: CoreMessage[];
|
345
345
|
metadata: {
|
package/dist/edge.d.ts
CHANGED
@@ -2,6 +2,55 @@ import { LanguageModelV1LogProbs, LanguageModelV1, LanguageModelV1ToolChoice } f
|
|
2
2
|
import { JSONSchema7 } from 'json-schema';
|
3
3
|
import { z } from 'zod';
|
4
4
|
|
5
|
+
declare const LanguageModelV1CallSettingsSchema: z.ZodObject<{
|
6
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
7
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
8
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
9
|
+
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
10
|
+
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
11
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
12
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
14
|
+
maxTokens?: number | undefined;
|
15
|
+
temperature?: number | undefined;
|
16
|
+
topP?: number | undefined;
|
17
|
+
presencePenalty?: number | undefined;
|
18
|
+
frequencyPenalty?: number | undefined;
|
19
|
+
seed?: number | undefined;
|
20
|
+
headers?: Record<string, string | undefined> | undefined;
|
21
|
+
}, {
|
22
|
+
maxTokens?: number | undefined;
|
23
|
+
temperature?: number | undefined;
|
24
|
+
topP?: number | undefined;
|
25
|
+
presencePenalty?: number | undefined;
|
26
|
+
frequencyPenalty?: number | undefined;
|
27
|
+
seed?: number | undefined;
|
28
|
+
headers?: Record<string, string | undefined> | undefined;
|
29
|
+
}>;
|
30
|
+
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
31
|
+
declare const LanguageModelConfigSchema: z.ZodObject<{
|
32
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
33
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
34
|
+
modelName: z.ZodOptional<z.ZodString>;
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
36
|
+
apiKey?: string | undefined;
|
37
|
+
baseUrl?: string | undefined;
|
38
|
+
modelName?: string | undefined;
|
39
|
+
}, {
|
40
|
+
apiKey?: string | undefined;
|
41
|
+
baseUrl?: string | undefined;
|
42
|
+
modelName?: string | undefined;
|
43
|
+
}>;
|
44
|
+
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
45
|
+
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs, context: {
|
46
|
+
abortSignal: AbortSignal;
|
47
|
+
}) => TResult | Promise<TResult>;
|
48
|
+
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
49
|
+
description?: string | undefined;
|
50
|
+
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
51
|
+
execute?: ToolExecuteFunction<TArgs, TResult>;
|
52
|
+
};
|
53
|
+
|
5
54
|
type TextContentPart = {
|
6
55
|
type: "text";
|
7
56
|
text: string;
|
@@ -50,23 +99,23 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
50
99
|
type: z.ZodLiteral<"text">;
|
51
100
|
text: z.ZodString;
|
52
101
|
}, "strip", z.ZodTypeAny, {
|
53
|
-
text: string;
|
54
102
|
type: "text";
|
55
|
-
}, {
|
56
103
|
text: string;
|
104
|
+
}, {
|
57
105
|
type: "text";
|
106
|
+
text: string;
|
58
107
|
}>], null>;
|
59
108
|
}, "strip", z.ZodTypeAny, {
|
60
109
|
role: "system";
|
61
110
|
content: [{
|
62
|
-
text: string;
|
63
111
|
type: "text";
|
112
|
+
text: string;
|
64
113
|
}];
|
65
114
|
}, {
|
66
115
|
role: "system";
|
67
116
|
content: [{
|
68
|
-
text: string;
|
69
117
|
type: "text";
|
118
|
+
text: string;
|
70
119
|
}];
|
71
120
|
}>, z.ZodObject<{
|
72
121
|
role: z.ZodLiteral<"user">;
|
@@ -74,38 +123,38 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
74
123
|
type: z.ZodLiteral<"text">;
|
75
124
|
text: z.ZodString;
|
76
125
|
}, "strip", z.ZodTypeAny, {
|
77
|
-
text: string;
|
78
126
|
type: "text";
|
79
|
-
}, {
|
80
127
|
text: string;
|
128
|
+
}, {
|
81
129
|
type: "text";
|
130
|
+
text: string;
|
82
131
|
}>, z.ZodObject<{
|
83
132
|
type: z.ZodLiteral<"image">;
|
84
133
|
image: z.ZodString;
|
85
134
|
}, "strip", z.ZodTypeAny, {
|
86
|
-
image: string;
|
87
135
|
type: "image";
|
88
|
-
}, {
|
89
136
|
image: string;
|
137
|
+
}, {
|
90
138
|
type: "image";
|
139
|
+
image: string;
|
91
140
|
}>]>, "many">;
|
92
141
|
}, "strip", z.ZodTypeAny, {
|
93
142
|
role: "user";
|
94
143
|
content: ({
|
95
|
-
text: string;
|
96
144
|
type: "text";
|
145
|
+
text: string;
|
97
146
|
} | {
|
98
|
-
image: string;
|
99
147
|
type: "image";
|
148
|
+
image: string;
|
100
149
|
})[];
|
101
150
|
}, {
|
102
151
|
role: "user";
|
103
152
|
content: ({
|
104
|
-
text: string;
|
105
153
|
type: "text";
|
154
|
+
text: string;
|
106
155
|
} | {
|
107
|
-
image: string;
|
108
156
|
type: "image";
|
157
|
+
image: string;
|
109
158
|
})[];
|
110
159
|
}>, z.ZodObject<{
|
111
160
|
role: z.ZodLiteral<"assistant">;
|
@@ -113,11 +162,11 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
113
162
|
type: z.ZodLiteral<"text">;
|
114
163
|
text: z.ZodString;
|
115
164
|
}, "strip", z.ZodTypeAny, {
|
116
|
-
text: string;
|
117
165
|
type: "text";
|
118
|
-
}, {
|
119
166
|
text: string;
|
167
|
+
}, {
|
120
168
|
type: "text";
|
169
|
+
text: string;
|
121
170
|
}>, z.ZodObject<{
|
122
171
|
type: z.ZodLiteral<"tool-call">;
|
123
172
|
toolCallId: z.ZodString;
|
@@ -143,8 +192,8 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
143
192
|
}, "strip", z.ZodTypeAny, {
|
144
193
|
role: "assistant";
|
145
194
|
content: ({
|
146
|
-
text: string;
|
147
195
|
type: "text";
|
196
|
+
text: string;
|
148
197
|
} | {
|
149
198
|
type: "tool-call";
|
150
199
|
toolCallId: string;
|
@@ -156,8 +205,8 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
156
205
|
}, {
|
157
206
|
role: "assistant";
|
158
207
|
content: ({
|
159
|
-
text: string;
|
160
208
|
type: "text";
|
209
|
+
text: string;
|
161
210
|
} | {
|
162
211
|
type: "tool-call";
|
163
212
|
toolCallId: string;
|
@@ -199,17 +248,17 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
199
248
|
messages: ({
|
200
249
|
role: "user";
|
201
250
|
content: ({
|
202
|
-
text: string;
|
203
251
|
type: "text";
|
252
|
+
text: string;
|
204
253
|
} | {
|
205
|
-
image: string;
|
206
254
|
type: "image";
|
255
|
+
image: string;
|
207
256
|
})[];
|
208
257
|
} | {
|
209
258
|
role: "assistant";
|
210
259
|
content: ({
|
211
|
-
text: string;
|
212
260
|
type: "text";
|
261
|
+
text: string;
|
213
262
|
} | {
|
214
263
|
type: "tool-call";
|
215
264
|
toolCallId: string;
|
@@ -221,11 +270,10 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
221
270
|
} | {
|
222
271
|
role: "system";
|
223
272
|
content: [{
|
224
|
-
text: string;
|
225
273
|
type: "text";
|
274
|
+
text: string;
|
226
275
|
}];
|
227
276
|
})[];
|
228
|
-
system?: string | undefined;
|
229
277
|
maxTokens?: number | undefined;
|
230
278
|
temperature?: number | undefined;
|
231
279
|
topP?: number | undefined;
|
@@ -236,6 +284,7 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
236
284
|
apiKey?: string | undefined;
|
237
285
|
baseUrl?: string | undefined;
|
238
286
|
modelName?: string | undefined;
|
287
|
+
system?: string | undefined;
|
239
288
|
tools?: {
|
240
289
|
type: "function";
|
241
290
|
name: string;
|
@@ -246,17 +295,17 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
246
295
|
messages: ({
|
247
296
|
role: "user";
|
248
297
|
content: ({
|
249
|
-
text: string;
|
250
298
|
type: "text";
|
299
|
+
text: string;
|
251
300
|
} | {
|
252
|
-
image: string;
|
253
301
|
type: "image";
|
302
|
+
image: string;
|
254
303
|
})[];
|
255
304
|
} | {
|
256
305
|
role: "assistant";
|
257
306
|
content: ({
|
258
|
-
text: string;
|
259
307
|
type: "text";
|
308
|
+
text: string;
|
260
309
|
} | {
|
261
310
|
type: "tool-call";
|
262
311
|
toolCallId: string;
|
@@ -268,11 +317,10 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
268
317
|
} | {
|
269
318
|
role: "system";
|
270
319
|
content: [{
|
271
|
-
text: string;
|
272
320
|
type: "text";
|
321
|
+
text: string;
|
273
322
|
}];
|
274
323
|
})[];
|
275
|
-
system?: string | undefined;
|
276
324
|
maxTokens?: number | undefined;
|
277
325
|
temperature?: number | undefined;
|
278
326
|
topP?: number | undefined;
|
@@ -283,6 +331,7 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
283
331
|
apiKey?: string | undefined;
|
284
332
|
baseUrl?: string | undefined;
|
285
333
|
modelName?: string | undefined;
|
334
|
+
system?: string | undefined;
|
286
335
|
tools?: {
|
287
336
|
type: "function";
|
288
337
|
name: string;
|
@@ -291,55 +340,6 @@ declare const EdgeRuntimeRequestOptionsSchema: z.ZodObject<z.objectUtil.extendSh
|
|
291
340
|
}[] | undefined;
|
292
341
|
}>;
|
293
342
|
|
294
|
-
declare const LanguageModelV1CallSettingsSchema: z.ZodObject<{
|
295
|
-
maxTokens: z.ZodOptional<z.ZodNumber>;
|
296
|
-
temperature: z.ZodOptional<z.ZodNumber>;
|
297
|
-
topP: z.ZodOptional<z.ZodNumber>;
|
298
|
-
presencePenalty: z.ZodOptional<z.ZodNumber>;
|
299
|
-
frequencyPenalty: z.ZodOptional<z.ZodNumber>;
|
300
|
-
seed: z.ZodOptional<z.ZodNumber>;
|
301
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
302
|
-
}, "strip", z.ZodTypeAny, {
|
303
|
-
maxTokens?: number | undefined;
|
304
|
-
temperature?: number | undefined;
|
305
|
-
topP?: number | undefined;
|
306
|
-
presencePenalty?: number | undefined;
|
307
|
-
frequencyPenalty?: number | undefined;
|
308
|
-
seed?: number | undefined;
|
309
|
-
headers?: Record<string, string | undefined> | undefined;
|
310
|
-
}, {
|
311
|
-
maxTokens?: number | undefined;
|
312
|
-
temperature?: number | undefined;
|
313
|
-
topP?: number | undefined;
|
314
|
-
presencePenalty?: number | undefined;
|
315
|
-
frequencyPenalty?: number | undefined;
|
316
|
-
seed?: number | undefined;
|
317
|
-
headers?: Record<string, string | undefined> | undefined;
|
318
|
-
}>;
|
319
|
-
type LanguageModelV1CallSettings = z.infer<typeof LanguageModelV1CallSettingsSchema>;
|
320
|
-
declare const LanguageModelConfigSchema: z.ZodObject<{
|
321
|
-
apiKey: z.ZodOptional<z.ZodString>;
|
322
|
-
baseUrl: z.ZodOptional<z.ZodString>;
|
323
|
-
modelName: z.ZodOptional<z.ZodString>;
|
324
|
-
}, "strip", z.ZodTypeAny, {
|
325
|
-
apiKey?: string | undefined;
|
326
|
-
baseUrl?: string | undefined;
|
327
|
-
modelName?: string | undefined;
|
328
|
-
}, {
|
329
|
-
apiKey?: string | undefined;
|
330
|
-
baseUrl?: string | undefined;
|
331
|
-
modelName?: string | undefined;
|
332
|
-
}>;
|
333
|
-
type LanguageModelConfig = z.infer<typeof LanguageModelConfigSchema>;
|
334
|
-
type ToolExecuteFunction<TArgs, TResult> = (args: TArgs, context: {
|
335
|
-
abortSignal: AbortSignal;
|
336
|
-
}) => TResult | Promise<TResult>;
|
337
|
-
type Tool<TArgs extends Record<string, unknown> = Record<string | number, unknown>, TResult = unknown> = {
|
338
|
-
description?: string | undefined;
|
339
|
-
parameters: z.ZodSchema<TArgs> | JSONSchema7;
|
340
|
-
execute?: ToolExecuteFunction<TArgs, TResult>;
|
341
|
-
};
|
342
|
-
|
343
343
|
type FinishResult = {
|
344
344
|
messages: CoreMessage[];
|
345
345
|
metadata: {
|
package/dist/edge.js
CHANGED
@@ -911,10 +911,14 @@ var toCoreMessage = (message) => {
|
|
911
911
|
case "user":
|
912
912
|
return {
|
913
913
|
role,
|
914
|
-
content:
|
915
|
-
|
916
|
-
|
917
|
-
|
914
|
+
content: [
|
915
|
+
...message.content.map((part) => {
|
916
|
+
if (part.type === "ui")
|
917
|
+
throw new Error("UI parts are not supported");
|
918
|
+
return part;
|
919
|
+
}),
|
920
|
+
...message.attachments.map((a) => a.content).flat()
|
921
|
+
]
|
918
922
|
};
|
919
923
|
case "system":
|
920
924
|
return {
|