ai 3.2.16 → 3.2.17
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/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/react/dist/index.d.mts +1 -1
- package/react/dist/index.d.ts +1 -1
- package/rsc/dist/rsc-server.mjs +11 -1
- package/rsc/dist/rsc-server.mjs.map +1 -1
- package/svelte/dist/index.js +8 -7
- package/svelte/dist/index.js.map +1 -1
- package/svelte/dist/index.mjs +8 -7
- package/svelte/dist/index.mjs.map +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ai",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.17",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"main": "./dist/index.js",
|
@@ -58,12 +58,12 @@
|
|
58
58
|
},
|
59
59
|
"dependencies": {
|
60
60
|
"@ai-sdk/provider": "0.0.11",
|
61
|
-
"@ai-sdk/provider-utils": "1.0.
|
62
|
-
"@ai-sdk/react": "0.0.
|
63
|
-
"@ai-sdk/solid": "0.0.
|
64
|
-
"@ai-sdk/svelte": "0.0.
|
65
|
-
"@ai-sdk/ui-utils": "0.0.
|
66
|
-
"@ai-sdk/vue": "0.0.
|
61
|
+
"@ai-sdk/provider-utils": "1.0.1",
|
62
|
+
"@ai-sdk/react": "0.0.17",
|
63
|
+
"@ai-sdk/solid": "0.0.12",
|
64
|
+
"@ai-sdk/svelte": "0.0.13",
|
65
|
+
"@ai-sdk/ui-utils": "0.0.10",
|
66
|
+
"@ai-sdk/vue": "0.0.12",
|
67
67
|
"eventsource-parser": "1.1.2",
|
68
68
|
"jsondiffpatch": "0.6.0",
|
69
69
|
"json-schema": "0.4.0",
|
package/react/dist/index.d.mts
CHANGED
@@ -5,6 +5,6 @@ export { CreateMessage, Message, UseChatHelpers, UseChatOptions } from '@ai-sdk/
|
|
5
5
|
declare const useChat: typeof useChat$1;
|
6
6
|
declare const useCompletion: typeof useCompletion$1;
|
7
7
|
declare const useAssistant: typeof useAssistant$1;
|
8
|
-
declare const experimental_useObject: <RESULT, INPUT = any>({ api, id, schema, initialValue, fetch, }: _ai_sdk_react.Experimental_UseObjectOptions<RESULT>) => _ai_sdk_react.Experimental_UseObjectHelpers<RESULT, INPUT>;
|
8
|
+
declare const experimental_useObject: <RESULT, INPUT = any>({ api, id, schema, initialValue, fetch, onError, }: _ai_sdk_react.Experimental_UseObjectOptions<RESULT>) => _ai_sdk_react.Experimental_UseObjectHelpers<RESULT, INPUT>;
|
9
9
|
|
10
10
|
export { experimental_useObject, useAssistant, useChat, useCompletion };
|
package/react/dist/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ export { CreateMessage, Message, UseChatHelpers, UseChatOptions } from '@ai-sdk/
|
|
5
5
|
declare const useChat: typeof useChat$1;
|
6
6
|
declare const useCompletion: typeof useCompletion$1;
|
7
7
|
declare const useAssistant: typeof useAssistant$1;
|
8
|
-
declare const experimental_useObject: <RESULT, INPUT = any>({ api, id, schema, initialValue, fetch, }: _ai_sdk_react.Experimental_UseObjectOptions<RESULT>) => _ai_sdk_react.Experimental_UseObjectHelpers<RESULT, INPUT>;
|
8
|
+
declare const experimental_useObject: <RESULT, INPUT = any>({ api, id, schema, initialValue, fetch, onError, }: _ai_sdk_react.Experimental_UseObjectOptions<RESULT>) => _ai_sdk_react.Experimental_UseObjectHelpers<RESULT, INPUT>;
|
9
9
|
|
10
10
|
export { experimental_useObject, useAssistant, useChat, useCompletion };
|
11
11
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/rsc/dist/rsc-server.mjs
CHANGED
@@ -466,6 +466,16 @@ function getValidatedPrompt(prompt) {
|
|
466
466
|
message: "prompt and messages cannot be defined at the same time"
|
467
467
|
});
|
468
468
|
}
|
469
|
+
if (prompt.messages != null) {
|
470
|
+
for (const message of prompt.messages) {
|
471
|
+
if (message.role === "system" && typeof message.content !== "string") {
|
472
|
+
throw new InvalidPromptError({
|
473
|
+
prompt,
|
474
|
+
message: "system message content must be a string"
|
475
|
+
});
|
476
|
+
}
|
477
|
+
}
|
478
|
+
}
|
469
479
|
return prompt.prompt != null ? {
|
470
480
|
type: "prompt",
|
471
481
|
prompt: prompt.prompt,
|
@@ -1209,7 +1219,7 @@ function createStreamableValueImpl(initialValue) {
|
|
1209
1219
|
}
|
1210
1220
|
warningTimeout = setTimeout(() => {
|
1211
1221
|
console.warn(
|
1212
|
-
"The streamable
|
1222
|
+
"The streamable value has been slow to update. This may be a bug or a performance issue or you forgot to call `.done()`."
|
1213
1223
|
);
|
1214
1224
|
}, DEV_DEFAULT_STREAMABLE_WARNING_TIME);
|
1215
1225
|
}
|