ai 6.0.57 → 6.0.58
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 +7 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/02-foundations/03-prompts.mdx +1 -1
- package/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +1 -2
- package/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +1 -2
- package/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +0 -1
- package/docs/07-reference/01-ai-sdk-core/69-add-tool-input-examples-middleware.mdx +1 -1
- package/docs/07-reference/02-ai-sdk-ui/47-infer-ui-tool.mdx +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1104,7 +1104,7 @@ var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
|
1104
1104
|
var import_provider_utils4 = require("@ai-sdk/provider-utils");
|
|
1105
1105
|
|
|
1106
1106
|
// src/version.ts
|
|
1107
|
-
var VERSION = true ? "6.0.
|
|
1107
|
+
var VERSION = true ? "6.0.58" : "0.0.0-test";
|
|
1108
1108
|
|
|
1109
1109
|
// src/util/download/download.ts
|
|
1110
1110
|
var download = async ({ url }) => {
|
package/dist/index.mjs
CHANGED
|
@@ -997,7 +997,7 @@ import {
|
|
|
997
997
|
} from "@ai-sdk/provider-utils";
|
|
998
998
|
|
|
999
999
|
// src/version.ts
|
|
1000
|
-
var VERSION = true ? "6.0.
|
|
1000
|
+
var VERSION = true ? "6.0.58" : "0.0.0-test";
|
|
1001
1001
|
|
|
1002
1002
|
// src/util/download/download.ts
|
|
1003
1003
|
var download = async ({ url }) => {
|
package/dist/internal/index.js
CHANGED
|
@@ -153,7 +153,7 @@ var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
|
153
153
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
154
154
|
|
|
155
155
|
// src/version.ts
|
|
156
|
-
var VERSION = true ? "6.0.
|
|
156
|
+
var VERSION = true ? "6.0.58" : "0.0.0-test";
|
|
157
157
|
|
|
158
158
|
// src/util/download/download.ts
|
|
159
159
|
var download = async ({ url }) => {
|
package/dist/internal/index.mjs
CHANGED
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
} from "@ai-sdk/provider-utils";
|
|
129
129
|
|
|
130
130
|
// src/version.ts
|
|
131
|
-
var VERSION = true ? "6.0.
|
|
131
|
+
var VERSION = true ? "6.0.58" : "0.0.0-test";
|
|
132
132
|
|
|
133
133
|
// src/util/download/download.ts
|
|
134
134
|
var download = async ({ url }) => {
|
|
@@ -168,7 +168,7 @@ const messages: ModelMessage[] = [
|
|
|
168
168
|
AI SDK UI hooks like [`useChat`](/docs/reference/ai-sdk-ui/use-chat) return
|
|
169
169
|
arrays of `UIMessage` objects, which do not support provider options. We
|
|
170
170
|
recommend using the
|
|
171
|
-
[`convertToModelMessages`](/docs/reference/ai-sdk-ui/convert-to-
|
|
171
|
+
[`convertToModelMessages`](/docs/reference/ai-sdk-ui/convert-to-model-messages)
|
|
172
172
|
function to convert `UIMessage` objects to
|
|
173
173
|
[`ModelMessage`](/docs/reference/ai-sdk-core/model-message) objects before
|
|
174
174
|
applying or appending message(s) or message parts with `providerOptions`.
|
|
@@ -142,7 +142,7 @@ for await (const chunk of stream) {
|
|
|
142
142
|
- The agent **must** implement the `.stream({ prompt, ... })` method and define its supported `tools` property.
|
|
143
143
|
- This utility returns an async iterable for maximal streaming flexibility. For HTTP responses, see [`createAgentUIStreamResponse`](/docs/reference/ai-sdk-core/create-agent-ui-stream-response) (Web) or [`pipeAgentUIStreamToResponse`](/docs/reference/ai-sdk-core/pipe-agent-ui-stream-to-response) (Node.js).
|
|
144
144
|
- The `uiMessages` parameter is named `uiMessages`, **not** just `messages`.
|
|
145
|
-
- You can provide advanced options via
|
|
145
|
+
- You can provide advanced options via `UIMessageStreamOptions` (for example, to include sources or usage).
|
|
146
146
|
- To cancel the stream, pass an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) via the `abortSignal` parameter.
|
|
147
147
|
|
|
148
148
|
## See Also
|
|
@@ -150,6 +150,5 @@ for await (const chunk of stream) {
|
|
|
150
150
|
- [`Agent`](/docs/reference/ai-sdk-core/agent)
|
|
151
151
|
- [`ToolLoopAgent`](/docs/reference/ai-sdk-core/tool-loop-agent)
|
|
152
152
|
- [`UIMessage`](/docs/reference/ai-sdk-core/ui-message)
|
|
153
|
-
- [`UIMessageStreamOptions`](/docs/reference/ai-sdk-core/ui-message-stream-options)
|
|
154
153
|
- [`createAgentUIStreamResponse`](/docs/reference/ai-sdk-core/create-agent-ui-stream-response)
|
|
155
154
|
- [`pipeAgentUIStreamToResponse`](/docs/reference/ai-sdk-core/pipe-agent-ui-stream-to-response)
|
|
@@ -99,7 +99,7 @@ export async function POST(request: Request) {
|
|
|
99
99
|
type: 'UIMessageStreamOptions',
|
|
100
100
|
isRequired: false,
|
|
101
101
|
description:
|
|
102
|
-
'Other UI message output options—such as `sendSources` and more.
|
|
102
|
+
'Other UI message output options—such as `sendSources` and more.',
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
name: 'headers',
|
|
@@ -170,5 +170,4 @@ export async function POST(request: Request) {
|
|
|
170
170
|
- [`Agent`](/docs/reference/ai-sdk-core/agent)
|
|
171
171
|
- [`ToolLoopAgent`](/docs/reference/ai-sdk-core/tool-loop-agent)
|
|
172
172
|
- [`UIMessage`](/docs/reference/ai-sdk-core/ui-message)
|
|
173
|
-
- [`UIMessageStreamOptions`](/docs/reference/ai-sdk-core/ui-message-stream-options)
|
|
174
173
|
- [`createAgentUIStream`](/docs/reference/ai-sdk-core/create-agent-ui-stream)
|
|
@@ -147,5 +147,4 @@ app.post('/chat', async (req, res) => {
|
|
|
147
147
|
|
|
148
148
|
- [`createAgentUIStreamResponse`](/docs/reference/ai-sdk-core/create-agent-ui-stream-response)
|
|
149
149
|
- [`Agent`](/docs/reference/ai-sdk-core/agent)
|
|
150
|
-
- [`UIMessageStreamOptions`](/docs/reference/ai-sdk-core/ui-message-stream-options)
|
|
151
150
|
- [`UIMessage`](/docs/reference/ai-sdk-core/ui-message)
|
|
@@ -56,7 +56,7 @@ function addToolInputExamplesMiddleware(options?: {
|
|
|
56
56
|
|
|
57
57
|
### Returns
|
|
58
58
|
|
|
59
|
-
A [LanguageModelMiddleware](/docs/
|
|
59
|
+
A [LanguageModelMiddleware](/docs/ai-sdk-core/middleware) that:
|
|
60
60
|
|
|
61
61
|
- Locates function tools with an `inputExamples` property.
|
|
62
62
|
- Serializes each input example (by default as JSON, or using your custom formatter).
|
|
@@ -72,4 +72,4 @@ type WeatherUITool = InferUITool<typeof weatherTool>;
|
|
|
72
72
|
## Related
|
|
73
73
|
|
|
74
74
|
- [`InferUITools`](/docs/reference/ai-sdk-ui/infer-ui-tools) - Infer types for a tool set
|
|
75
|
-
- [`ToolUIPart`](/docs/reference/ai-sdk-
|
|
75
|
+
- [`ToolUIPart`](/docs/reference/ai-sdk-core/ui-message#tooluipart) - Tool part type for UI messages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.58",
|
|
4
4
|
"description": "AI SDK by Vercel - The AI Toolkit for TypeScript and JavaScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@opentelemetry/api": "1.9.0",
|
|
48
|
-
"@ai-sdk/gateway": "3.0.
|
|
48
|
+
"@ai-sdk/gateway": "3.0.26",
|
|
49
49
|
"@ai-sdk/provider": "3.0.5",
|
|
50
50
|
"@ai-sdk/provider-utils": "4.0.10"
|
|
51
51
|
},
|