ai 5.0.19 → 5.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/CHANGELOG.md +16 -0
- package/dist/index.d.mts +25 -11
- package/dist/index.d.ts +25 -11
- package/dist/index.js +34 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -39
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +25 -11
- package/dist/internal/index.d.ts +25 -11
- package/package.json +3 -3
@@ -18,19 +18,33 @@ type Prompt = {
|
|
18
18
|
System message to include in the prompt. Can be used with `prompt` or `messages`.
|
19
19
|
*/
|
20
20
|
system?: string;
|
21
|
+
} & ({
|
21
22
|
/**
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
prompt
|
23
|
+
A prompt. It can be either a text prompt or a list of messages.
|
24
|
+
|
25
|
+
You can either use `prompt` or `messages` but not both.
|
26
|
+
*/
|
27
|
+
prompt: string | Array<ModelMessage>;
|
27
28
|
/**
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
messages?:
|
33
|
-
}
|
29
|
+
A list of messages.
|
30
|
+
|
31
|
+
You can either use `prompt` or `messages` but not both.
|
32
|
+
*/
|
33
|
+
messages?: never;
|
34
|
+
} | {
|
35
|
+
/**
|
36
|
+
A list of messages.
|
37
|
+
|
38
|
+
You can either use `prompt` or `messages` but not both.
|
39
|
+
*/
|
40
|
+
messages: Array<ModelMessage>;
|
41
|
+
/**
|
42
|
+
A prompt. It can be either a text prompt or a list of messages.
|
43
|
+
|
44
|
+
You can either use `prompt` or `messages` but not both.
|
45
|
+
*/
|
46
|
+
prompt?: never;
|
47
|
+
});
|
34
48
|
|
35
49
|
type StandardizedPrompt = {
|
36
50
|
/**
|
package/dist/internal/index.d.ts
CHANGED
@@ -18,19 +18,33 @@ type Prompt = {
|
|
18
18
|
System message to include in the prompt. Can be used with `prompt` or `messages`.
|
19
19
|
*/
|
20
20
|
system?: string;
|
21
|
+
} & ({
|
21
22
|
/**
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
prompt
|
23
|
+
A prompt. It can be either a text prompt or a list of messages.
|
24
|
+
|
25
|
+
You can either use `prompt` or `messages` but not both.
|
26
|
+
*/
|
27
|
+
prompt: string | Array<ModelMessage>;
|
27
28
|
/**
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
messages?:
|
33
|
-
}
|
29
|
+
A list of messages.
|
30
|
+
|
31
|
+
You can either use `prompt` or `messages` but not both.
|
32
|
+
*/
|
33
|
+
messages?: never;
|
34
|
+
} | {
|
35
|
+
/**
|
36
|
+
A list of messages.
|
37
|
+
|
38
|
+
You can either use `prompt` or `messages` but not both.
|
39
|
+
*/
|
40
|
+
messages: Array<ModelMessage>;
|
41
|
+
/**
|
42
|
+
A prompt. It can be either a text prompt or a list of messages.
|
43
|
+
|
44
|
+
You can either use `prompt` or `messages` but not both.
|
45
|
+
*/
|
46
|
+
prompt?: never;
|
47
|
+
});
|
34
48
|
|
35
49
|
type StandardizedPrompt = {
|
36
50
|
/**
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ai",
|
3
|
-
"version": "5.0.
|
3
|
+
"version": "5.0.21",
|
4
4
|
"description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"sideEffects": false,
|
@@ -42,9 +42,9 @@
|
|
42
42
|
},
|
43
43
|
"dependencies": {
|
44
44
|
"@opentelemetry/api": "1.9.0",
|
45
|
-
"@ai-sdk/gateway": "1.0.
|
45
|
+
"@ai-sdk/gateway": "1.0.10",
|
46
46
|
"@ai-sdk/provider": "2.0.0",
|
47
|
-
"@ai-sdk/provider-utils": "3.0.
|
47
|
+
"@ai-sdk/provider-utils": "3.0.5"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
50
50
|
"@edge-runtime/vm": "^5.0.0",
|