ai 3.2.16 → 3.2.18
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/README.md +2 -2
- 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/dist/index.mjs
CHANGED
@@ -389,6 +389,16 @@ function getValidatedPrompt(prompt) {
|
|
389
389
|
message: "prompt and messages cannot be defined at the same time"
|
390
390
|
});
|
391
391
|
}
|
392
|
+
if (prompt.messages != null) {
|
393
|
+
for (const message of prompt.messages) {
|
394
|
+
if (message.role === "system" && typeof message.content !== "string") {
|
395
|
+
throw new InvalidPromptError({
|
396
|
+
prompt,
|
397
|
+
message: "system message content must be a string"
|
398
|
+
});
|
399
|
+
}
|
400
|
+
}
|
401
|
+
}
|
392
402
|
return prompt.prompt != null ? {
|
393
403
|
type: "prompt",
|
394
404
|
prompt: prompt.prompt,
|