ai 3.0.19 → 3.0.21
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/anthropic/dist/index.d.mts +1 -319
- package/anthropic/dist/index.d.ts +1 -319
- package/anthropic/dist/index.js +44 -216
- package/anthropic/dist/index.js.map +1 -1
- package/anthropic/dist/index.mjs +32 -200
- package/anthropic/dist/index.mjs.map +1 -1
- package/dist/index.d.mts +60 -333
- package/dist/index.d.ts +60 -333
- package/dist/index.js +152 -441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +127 -412
- package/dist/index.mjs.map +1 -1
- package/google/dist/index.d.mts +1 -319
- package/google/dist/index.d.ts +1 -319
- package/google/dist/index.js +75 -229
- package/google/dist/index.js.map +1 -1
- package/google/dist/index.mjs +63 -213
- package/google/dist/index.mjs.map +1 -1
- package/mistral/dist/index.d.mts +1 -319
- package/mistral/dist/index.d.ts +1 -319
- package/mistral/dist/index.js +32 -205
- package/mistral/dist/index.js.map +1 -1
- package/mistral/dist/index.mjs +20 -189
- package/mistral/dist/index.mjs.map +1 -1
- package/openai/dist/index.d.mts +2 -320
- package/openai/dist/index.d.ts +2 -320
- package/openai/dist/index.js +69 -280
- package/openai/dist/index.js.map +1 -1
- package/openai/dist/index.mjs +57 -260
- package/openai/dist/index.mjs.map +1 -1
- package/package.json +4 -10
- package/react/dist/index.d.mts +8 -4
- package/react/dist/index.d.ts +12 -6
- package/react/dist/index.js +23 -105
- package/react/dist/index.js.map +1 -1
- package/react/dist/index.mjs +22 -105
- package/react/dist/index.mjs.map +1 -1
- package/react/dist/index.server.d.mts +4 -2
- package/react/dist/index.server.d.ts +4 -2
- package/react/dist/index.server.js.map +1 -1
- package/react/dist/index.server.mjs.map +1 -1
- package/rsc/dist/rsc-server.mjs +6 -16
- package/rsc/dist/rsc-server.mjs.map +1 -1
- package/solid/dist/index.d.mts +1 -1
- package/solid/dist/index.d.ts +1 -1
- package/solid/dist/index.js +19 -104
- package/solid/dist/index.js.map +1 -1
- package/solid/dist/index.mjs +19 -104
- package/solid/dist/index.mjs.map +1 -1
- package/svelte/dist/index.d.mts +1 -1
- package/svelte/dist/index.d.ts +1 -1
- package/svelte/dist/index.js +19 -104
- package/svelte/dist/index.js.map +1 -1
- package/svelte/dist/index.mjs +19 -104
- package/svelte/dist/index.mjs.map +1 -1
- package/vue/dist/index.d.mts +1 -1
- package/vue/dist/index.d.ts +1 -1
- package/vue/dist/index.js +19 -104
- package/vue/dist/index.js.map +1 -1
- package/vue/dist/index.mjs +19 -104
- package/vue/dist/index.mjs.map +1 -1
- package/spec/dist/index.d.mts +0 -752
- package/spec/dist/index.d.ts +0 -752
- package/spec/dist/index.js +0 -873
- package/spec/dist/index.js.map +0 -1
- package/spec/dist/index.mjs +0 -807
- package/spec/dist/index.mjs.map +0 -1
package/openai/dist/index.mjs
CHANGED
@@ -1,90 +1,3 @@
|
|
1
|
-
// spec/errors/api-call-error.ts
|
2
|
-
var APICallError = class extends Error {
|
3
|
-
constructor({
|
4
|
-
message,
|
5
|
-
url,
|
6
|
-
requestBodyValues,
|
7
|
-
statusCode,
|
8
|
-
responseBody,
|
9
|
-
cause,
|
10
|
-
isRetryable = statusCode != null && (statusCode === 408 || // request timeout
|
11
|
-
statusCode === 409 || // conflict
|
12
|
-
statusCode === 429 || // too many requests
|
13
|
-
statusCode >= 500),
|
14
|
-
// server error
|
15
|
-
data
|
16
|
-
}) {
|
17
|
-
super(message);
|
18
|
-
this.name = "AI_APICallError";
|
19
|
-
this.url = url;
|
20
|
-
this.requestBodyValues = requestBodyValues;
|
21
|
-
this.statusCode = statusCode;
|
22
|
-
this.responseBody = responseBody;
|
23
|
-
this.cause = cause;
|
24
|
-
this.isRetryable = isRetryable;
|
25
|
-
this.data = data;
|
26
|
-
}
|
27
|
-
static isAPICallError(error) {
|
28
|
-
return error instanceof Error && error.name === "AI_APICallError" && typeof error.url === "string" && typeof error.requestBodyValues === "object" && (error.statusCode == null || typeof error.statusCode === "number") && (error.responseBody == null || typeof error.responseBody === "string") && (error.cause == null || typeof error.cause === "object") && typeof error.isRetryable === "boolean" && (error.data == null || typeof error.data === "object");
|
29
|
-
}
|
30
|
-
toJSON() {
|
31
|
-
return {
|
32
|
-
name: this.name,
|
33
|
-
message: this.message,
|
34
|
-
url: this.url,
|
35
|
-
requestBodyValues: this.requestBodyValues,
|
36
|
-
statusCode: this.statusCode,
|
37
|
-
responseBody: this.responseBody,
|
38
|
-
cause: this.cause,
|
39
|
-
isRetryable: this.isRetryable,
|
40
|
-
data: this.data
|
41
|
-
};
|
42
|
-
}
|
43
|
-
};
|
44
|
-
|
45
|
-
// spec/errors/invalid-prompt-error.ts
|
46
|
-
var InvalidPromptError = class extends Error {
|
47
|
-
constructor({ prompt: prompt2, message }) {
|
48
|
-
super(`Invalid prompt: ${message}`);
|
49
|
-
this.name = "AI_InvalidPromptError";
|
50
|
-
this.prompt = prompt2;
|
51
|
-
}
|
52
|
-
static isInvalidPromptError(error) {
|
53
|
-
return error instanceof Error && error.name === "AI_InvalidPromptError" && prompt != null;
|
54
|
-
}
|
55
|
-
toJSON() {
|
56
|
-
return {
|
57
|
-
name: this.name,
|
58
|
-
message: this.message,
|
59
|
-
stack: this.stack,
|
60
|
-
prompt: this.prompt
|
61
|
-
};
|
62
|
-
}
|
63
|
-
};
|
64
|
-
|
65
|
-
// spec/errors/invalid-response-data-error.ts
|
66
|
-
var InvalidResponseDataError = class extends Error {
|
67
|
-
constructor({
|
68
|
-
data,
|
69
|
-
message = `Invalid response data: ${JSON.stringify(data)}.`
|
70
|
-
}) {
|
71
|
-
super(message);
|
72
|
-
this.name = "AI_InvalidResponseDataError";
|
73
|
-
this.data = data;
|
74
|
-
}
|
75
|
-
static isInvalidResponseDataError(error) {
|
76
|
-
return error instanceof Error && error.name === "AI_InvalidResponseDataError" && error.data != null;
|
77
|
-
}
|
78
|
-
toJSON() {
|
79
|
-
return {
|
80
|
-
name: this.name,
|
81
|
-
message: this.message,
|
82
|
-
stack: this.stack,
|
83
|
-
data: this.data
|
84
|
-
};
|
85
|
-
}
|
86
|
-
};
|
87
|
-
|
88
1
|
// spec/util/generate-id.ts
|
89
2
|
import { customAlphabet } from "nanoid/non-secure";
|
90
3
|
var generateId = customAlphabet(
|
@@ -92,38 +5,8 @@ var generateId = customAlphabet(
|
|
92
5
|
7
|
93
6
|
);
|
94
7
|
|
95
|
-
// spec/util/get-error-message.ts
|
96
|
-
function getErrorMessage(error) {
|
97
|
-
if (error == null) {
|
98
|
-
return "unknown error";
|
99
|
-
}
|
100
|
-
if (typeof error === "string") {
|
101
|
-
return error;
|
102
|
-
}
|
103
|
-
if (error instanceof Error) {
|
104
|
-
return error.message;
|
105
|
-
}
|
106
|
-
return JSON.stringify(error);
|
107
|
-
}
|
108
|
-
|
109
|
-
// spec/errors/load-api-key-error.ts
|
110
|
-
var LoadAPIKeyError = class extends Error {
|
111
|
-
constructor({ message }) {
|
112
|
-
super(message);
|
113
|
-
this.name = "AI_LoadAPIKeyError";
|
114
|
-
}
|
115
|
-
static isLoadAPIKeyError(error) {
|
116
|
-
return error instanceof Error && error.name === "AI_LoadAPIKeyError";
|
117
|
-
}
|
118
|
-
toJSON() {
|
119
|
-
return {
|
120
|
-
name: this.name,
|
121
|
-
message: this.message
|
122
|
-
};
|
123
|
-
}
|
124
|
-
};
|
125
|
-
|
126
8
|
// spec/util/load-api-key.ts
|
9
|
+
import { LoadAPIKeyError } from "@ai-sdk/provider";
|
127
10
|
function loadApiKey({
|
128
11
|
apiKey,
|
129
12
|
environmentVariableName,
|
@@ -158,59 +41,11 @@ function loadApiKey({
|
|
158
41
|
}
|
159
42
|
|
160
43
|
// spec/util/parse-json.ts
|
44
|
+
import { JSONParseError, TypeValidationError as TypeValidationError2 } from "@ai-sdk/provider";
|
161
45
|
import SecureJSON from "secure-json-parse";
|
162
46
|
|
163
|
-
// spec/errors/json-parse-error.ts
|
164
|
-
var JSONParseError = class extends Error {
|
165
|
-
constructor({ text, cause }) {
|
166
|
-
super(
|
167
|
-
`JSON parsing failed: Text: ${text}.
|
168
|
-
Error message: ${getErrorMessage(cause)}`
|
169
|
-
);
|
170
|
-
this.name = "AI_JSONParseError";
|
171
|
-
this.cause = cause;
|
172
|
-
this.text = text;
|
173
|
-
}
|
174
|
-
static isJSONParseError(error) {
|
175
|
-
return error instanceof Error && error.name === "AI_JSONParseError" && typeof error.text === "string" && typeof error.cause === "string";
|
176
|
-
}
|
177
|
-
toJSON() {
|
178
|
-
return {
|
179
|
-
name: this.name,
|
180
|
-
message: this.message,
|
181
|
-
cause: this.cause,
|
182
|
-
stack: this.stack,
|
183
|
-
valueText: this.text
|
184
|
-
};
|
185
|
-
}
|
186
|
-
};
|
187
|
-
|
188
|
-
// spec/errors/type-validation-error.ts
|
189
|
-
var TypeValidationError = class extends Error {
|
190
|
-
constructor({ value, cause }) {
|
191
|
-
super(
|
192
|
-
`Type validation failed: Value: ${JSON.stringify(value)}.
|
193
|
-
Error message: ${getErrorMessage(cause)}`
|
194
|
-
);
|
195
|
-
this.name = "AI_TypeValidationError";
|
196
|
-
this.cause = cause;
|
197
|
-
this.value = value;
|
198
|
-
}
|
199
|
-
static isTypeValidationError(error) {
|
200
|
-
return error instanceof Error && error.name === "AI_TypeValidationError" && typeof error.value === "string" && typeof error.cause === "string";
|
201
|
-
}
|
202
|
-
toJSON() {
|
203
|
-
return {
|
204
|
-
name: this.name,
|
205
|
-
message: this.message,
|
206
|
-
cause: this.cause,
|
207
|
-
stack: this.stack,
|
208
|
-
value: this.value
|
209
|
-
};
|
210
|
-
}
|
211
|
-
};
|
212
|
-
|
213
47
|
// spec/util/validate-types.ts
|
48
|
+
import { TypeValidationError } from "@ai-sdk/provider";
|
214
49
|
function validateTypes({
|
215
50
|
value,
|
216
51
|
schema
|
@@ -260,7 +95,7 @@ function parseJSON({
|
|
260
95
|
}
|
261
96
|
return validateTypes({ value, schema });
|
262
97
|
} catch (error) {
|
263
|
-
if (JSONParseError.isJSONParseError(error) ||
|
98
|
+
if (JSONParseError.isJSONParseError(error) || TypeValidationError2.isTypeValidationError(error)) {
|
264
99
|
throw error;
|
265
100
|
}
|
266
101
|
throw new JSONParseError({ text, cause: error });
|
@@ -296,6 +131,7 @@ function isParseableJson(input) {
|
|
296
131
|
}
|
297
132
|
|
298
133
|
// spec/util/post-to-api.ts
|
134
|
+
import { APICallError } from "@ai-sdk/provider";
|
299
135
|
var postJsonToApi = async ({
|
300
136
|
url,
|
301
137
|
headers,
|
@@ -401,29 +237,10 @@ var postToApi = async ({
|
|
401
237
|
};
|
402
238
|
|
403
239
|
// spec/util/response-handler.ts
|
240
|
+
import { APICallError as APICallError2, NoResponseBodyError } from "@ai-sdk/provider";
|
404
241
|
import {
|
405
242
|
EventSourceParserStream
|
406
243
|
} from "eventsource-parser/stream";
|
407
|
-
|
408
|
-
// spec/errors/no-response-body-error.ts
|
409
|
-
var NoResponseBodyError = class extends Error {
|
410
|
-
constructor({ message = "No response body" } = {}) {
|
411
|
-
super(message);
|
412
|
-
this.name = "AI_NoResponseBodyError";
|
413
|
-
}
|
414
|
-
static isNoResponseBodyError(error) {
|
415
|
-
return error instanceof Error && error.name === "AI_NoResponseBodyError";
|
416
|
-
}
|
417
|
-
toJSON() {
|
418
|
-
return {
|
419
|
-
name: this.name,
|
420
|
-
message: this.message,
|
421
|
-
stack: this.stack
|
422
|
-
};
|
423
|
-
}
|
424
|
-
};
|
425
|
-
|
426
|
-
// spec/util/response-handler.ts
|
427
244
|
var createJsonErrorResponseHandler = ({
|
428
245
|
errorSchema,
|
429
246
|
errorToMessage,
|
@@ -431,7 +248,7 @@ var createJsonErrorResponseHandler = ({
|
|
431
248
|
}) => async ({ response, url, requestBodyValues }) => {
|
432
249
|
const responseBody = await response.text();
|
433
250
|
if (responseBody.trim() === "") {
|
434
|
-
return new
|
251
|
+
return new APICallError2({
|
435
252
|
message: response.statusText,
|
436
253
|
url,
|
437
254
|
requestBodyValues,
|
@@ -445,7 +262,7 @@ var createJsonErrorResponseHandler = ({
|
|
445
262
|
text: responseBody,
|
446
263
|
schema: errorSchema
|
447
264
|
});
|
448
|
-
return new
|
265
|
+
return new APICallError2({
|
449
266
|
message: errorToMessage(parsedError),
|
450
267
|
url,
|
451
268
|
requestBodyValues,
|
@@ -455,7 +272,7 @@ var createJsonErrorResponseHandler = ({
|
|
455
272
|
isRetryable: isRetryable == null ? void 0 : isRetryable(response, parsedError)
|
456
273
|
});
|
457
274
|
} catch (parseError) {
|
458
|
-
return new
|
275
|
+
return new APICallError2({
|
459
276
|
message: response.statusText,
|
460
277
|
url,
|
461
278
|
requestBodyValues,
|
@@ -492,7 +309,7 @@ var createJsonResponseHandler = (responseSchema) => async ({ response, url, requ
|
|
492
309
|
schema: responseSchema
|
493
310
|
});
|
494
311
|
if (!parsedResult.success) {
|
495
|
-
throw new
|
312
|
+
throw new APICallError2({
|
496
313
|
message: "Invalid JSON response",
|
497
314
|
cause: parsedResult.error,
|
498
315
|
statusCode: response.status,
|
@@ -529,40 +346,17 @@ function convertUint8ArrayToBase64(array) {
|
|
529
346
|
return globalThis.btoa(latin1string);
|
530
347
|
}
|
531
348
|
|
532
|
-
// spec/errors/unsupported-functionality-error.ts
|
533
|
-
var UnsupportedFunctionalityError = class extends Error {
|
534
|
-
constructor({
|
535
|
-
provider,
|
536
|
-
functionality
|
537
|
-
}) {
|
538
|
-
super(
|
539
|
-
`'${functionality}' functionality not supported by the '${provider}' provider.`
|
540
|
-
);
|
541
|
-
this.name = "AI_UnsupportedFunctionalityError";
|
542
|
-
this.provider = provider;
|
543
|
-
this.functionality = functionality;
|
544
|
-
}
|
545
|
-
static isUnsupportedFunctionalityError(error) {
|
546
|
-
return error instanceof Error && error.name === "AI_UnsupportedFunctionalityError" && typeof error.provider === "string" && typeof error.functionality === "string";
|
547
|
-
}
|
548
|
-
toJSON() {
|
549
|
-
return {
|
550
|
-
name: this.name,
|
551
|
-
message: this.message,
|
552
|
-
stack: this.stack,
|
553
|
-
provider: this.provider,
|
554
|
-
functionality: this.functionality
|
555
|
-
};
|
556
|
-
}
|
557
|
-
};
|
558
|
-
|
559
349
|
// openai/openai-chat-language-model.ts
|
350
|
+
import {
|
351
|
+
InvalidResponseDataError,
|
352
|
+
UnsupportedFunctionalityError
|
353
|
+
} from "@ai-sdk/provider";
|
560
354
|
import { z as z2 } from "zod";
|
561
355
|
|
562
356
|
// openai/convert-to-openai-chat-messages.ts
|
563
|
-
function convertToOpenAIChatMessages(
|
357
|
+
function convertToOpenAIChatMessages(prompt) {
|
564
358
|
const messages = [];
|
565
|
-
for (const { role, content } of
|
359
|
+
for (const { role, content } of prompt) {
|
566
360
|
switch (role) {
|
567
361
|
case "system": {
|
568
362
|
messages.push({ role: "system", content });
|
@@ -688,7 +482,7 @@ var OpenAIChatLanguageModel = class {
|
|
688
482
|
}
|
689
483
|
getArgs({
|
690
484
|
mode,
|
691
|
-
prompt
|
485
|
+
prompt,
|
692
486
|
maxTokens,
|
693
487
|
temperature,
|
694
488
|
topP,
|
@@ -728,7 +522,7 @@ var OpenAIChatLanguageModel = class {
|
|
728
522
|
}),
|
729
523
|
seed,
|
730
524
|
// messages:
|
731
|
-
messages: convertToOpenAIChatMessages(
|
525
|
+
messages: convertToOpenAIChatMessages(prompt)
|
732
526
|
};
|
733
527
|
switch (type) {
|
734
528
|
case "regular": {
|
@@ -755,13 +549,21 @@ var OpenAIChatLanguageModel = class {
|
|
755
549
|
return {
|
756
550
|
...baseArgs,
|
757
551
|
tool_choice: { type: "function", function: { name: mode.tool.name } },
|
758
|
-
tools: [
|
552
|
+
tools: [
|
553
|
+
{
|
554
|
+
type: "function",
|
555
|
+
function: {
|
556
|
+
name: mode.tool.name,
|
557
|
+
description: mode.tool.description,
|
558
|
+
parameters: mode.tool.parameters
|
559
|
+
}
|
560
|
+
}
|
561
|
+
]
|
759
562
|
};
|
760
563
|
}
|
761
564
|
case "object-grammar": {
|
762
565
|
throw new UnsupportedFunctionalityError({
|
763
|
-
functionality: "object-grammar mode"
|
764
|
-
provider: this.provider
|
566
|
+
functionality: "object-grammar mode"
|
765
567
|
});
|
766
568
|
}
|
767
569
|
default: {
|
@@ -977,32 +779,38 @@ var openaiChatChunkSchema = z2.object({
|
|
977
779
|
});
|
978
780
|
|
979
781
|
// openai/openai-completion-language-model.ts
|
782
|
+
import {
|
783
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError3
|
784
|
+
} from "@ai-sdk/provider";
|
980
785
|
import { z as z3 } from "zod";
|
981
786
|
|
982
787
|
// openai/convert-to-openai-completion-prompt.ts
|
788
|
+
import {
|
789
|
+
InvalidPromptError,
|
790
|
+
UnsupportedFunctionalityError as UnsupportedFunctionalityError2
|
791
|
+
} from "@ai-sdk/provider";
|
983
792
|
function convertToOpenAICompletionPrompt({
|
984
|
-
prompt
|
793
|
+
prompt,
|
985
794
|
inputFormat,
|
986
|
-
provider,
|
987
795
|
user = "user",
|
988
796
|
assistant = "assistant"
|
989
797
|
}) {
|
990
|
-
if (inputFormat === "prompt" &&
|
991
|
-
return { prompt:
|
798
|
+
if (inputFormat === "prompt" && prompt.length === 1 && prompt[0].role === "user" && prompt[0].content.length === 1 && prompt[0].content[0].type === "text") {
|
799
|
+
return { prompt: prompt[0].content[0].text };
|
992
800
|
}
|
993
801
|
let text = "";
|
994
|
-
if (
|
995
|
-
text += `${
|
802
|
+
if (prompt[0].role === "system") {
|
803
|
+
text += `${prompt[0].content}
|
996
804
|
|
997
805
|
`;
|
998
|
-
|
806
|
+
prompt = prompt.slice(1);
|
999
807
|
}
|
1000
|
-
for (const { role, content } of
|
808
|
+
for (const { role, content } of prompt) {
|
1001
809
|
switch (role) {
|
1002
810
|
case "system": {
|
1003
811
|
throw new InvalidPromptError({
|
1004
812
|
message: "Unexpected system message in prompt: ${content}",
|
1005
|
-
prompt
|
813
|
+
prompt
|
1006
814
|
});
|
1007
815
|
}
|
1008
816
|
case "user": {
|
@@ -1012,8 +820,7 @@ function convertToOpenAICompletionPrompt({
|
|
1012
820
|
return part.text;
|
1013
821
|
}
|
1014
822
|
case "image": {
|
1015
|
-
throw new
|
1016
|
-
provider,
|
823
|
+
throw new UnsupportedFunctionalityError2({
|
1017
824
|
functionality: "images"
|
1018
825
|
});
|
1019
826
|
}
|
@@ -1032,8 +839,7 @@ ${userMessage}
|
|
1032
839
|
return part.text;
|
1033
840
|
}
|
1034
841
|
case "tool-call": {
|
1035
|
-
throw new
|
1036
|
-
provider,
|
842
|
+
throw new UnsupportedFunctionalityError2({
|
1037
843
|
functionality: "tool-call messages"
|
1038
844
|
});
|
1039
845
|
}
|
@@ -1046,8 +852,7 @@ ${assistantMessage}
|
|
1046
852
|
break;
|
1047
853
|
}
|
1048
854
|
case "tool": {
|
1049
|
-
throw new
|
1050
|
-
provider,
|
855
|
+
throw new UnsupportedFunctionalityError2({
|
1051
856
|
functionality: "tool messages"
|
1052
857
|
});
|
1053
858
|
}
|
@@ -1081,7 +886,7 @@ var OpenAICompletionLanguageModel = class {
|
|
1081
886
|
getArgs({
|
1082
887
|
mode,
|
1083
888
|
inputFormat,
|
1084
|
-
prompt
|
889
|
+
prompt,
|
1085
890
|
maxTokens,
|
1086
891
|
temperature,
|
1087
892
|
topP,
|
@@ -1091,11 +896,7 @@ var OpenAICompletionLanguageModel = class {
|
|
1091
896
|
}) {
|
1092
897
|
var _a;
|
1093
898
|
const type = mode.type;
|
1094
|
-
const { prompt: completionPrompt, stopSequences } = convertToOpenAICompletionPrompt({
|
1095
|
-
prompt: prompt2,
|
1096
|
-
inputFormat,
|
1097
|
-
provider: this.provider
|
1098
|
-
});
|
899
|
+
const { prompt: completionPrompt, stopSequences } = convertToOpenAICompletionPrompt({ prompt, inputFormat });
|
1099
900
|
const baseArgs = {
|
1100
901
|
// model id:
|
1101
902
|
model: this.modelId,
|
@@ -1135,29 +936,25 @@ var OpenAICompletionLanguageModel = class {
|
|
1135
936
|
switch (type) {
|
1136
937
|
case "regular": {
|
1137
938
|
if ((_a = mode.tools) == null ? void 0 : _a.length) {
|
1138
|
-
throw new
|
1139
|
-
functionality: "tools"
|
1140
|
-
provider: this.provider
|
939
|
+
throw new UnsupportedFunctionalityError3({
|
940
|
+
functionality: "tools"
|
1141
941
|
});
|
1142
942
|
}
|
1143
943
|
return baseArgs;
|
1144
944
|
}
|
1145
945
|
case "object-json": {
|
1146
|
-
throw new
|
1147
|
-
functionality: "object-json mode"
|
1148
|
-
provider: this.provider
|
946
|
+
throw new UnsupportedFunctionalityError3({
|
947
|
+
functionality: "object-json mode"
|
1149
948
|
});
|
1150
949
|
}
|
1151
950
|
case "object-tool": {
|
1152
|
-
throw new
|
1153
|
-
functionality: "object-tool mode"
|
1154
|
-
provider: this.provider
|
951
|
+
throw new UnsupportedFunctionalityError3({
|
952
|
+
functionality: "object-tool mode"
|
1155
953
|
});
|
1156
954
|
}
|
1157
955
|
case "object-grammar": {
|
1158
|
-
throw new
|
1159
|
-
functionality: "object-grammar mode"
|
1160
|
-
provider: this.provider
|
956
|
+
throw new UnsupportedFunctionalityError3({
|
957
|
+
functionality: "object-grammar mode"
|
1161
958
|
});
|
1162
959
|
}
|
1163
960
|
default: {
|