ai 6.0.40 → 6.0.41
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 +6 -0
- package/dist/index.d.mts +0 -4
- package/dist/index.d.ts +0 -4
- package/dist/index.js +322 -349
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +322 -349
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -20
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +1 -20
- package/dist/internal/index.mjs.map +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +1 -0
- package/docs/02-foundations/04-tools.mdx +89 -0
- package/docs/07-reference/02-ai-sdk-ui/01-use-chat.mdx +0 -7
- package/package.json +1 -1
- package/src/agent/create-agent-ui-stream-response.test.ts +1 -1
- package/src/generate-text/__snapshots__/stream-text.test.ts.snap +4 -52
- package/src/generate-text/stream-text.test.ts +7 -407
- package/src/generate-text/stream-text.ts +0 -1
- package/src/types/usage.ts +0 -24
- package/src/ui/chat.ts +0 -6
- package/src/ui/process-ui-message-stream.ts +0 -5
- package/src/ui-message-stream/ui-message-chunks.ts +0 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1749,7 +1749,6 @@ declare const uiMessageChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
1749
1749
|
} | {
|
|
1750
1750
|
type: "finish";
|
|
1751
1751
|
finishReason?: "length" | "error" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
1752
|
-
usage?: LanguageModelUsage | undefined;
|
|
1753
1752
|
messageMetadata?: unknown;
|
|
1754
1753
|
} | {
|
|
1755
1754
|
type: "abort";
|
|
@@ -1875,7 +1874,6 @@ type UIMessageChunk<METADATA = unknown, DATA_TYPES extends UIDataTypes = UIDataT
|
|
|
1875
1874
|
} | {
|
|
1876
1875
|
type: 'finish';
|
|
1877
1876
|
finishReason?: FinishReason;
|
|
1878
|
-
usage?: LanguageModelUsage;
|
|
1879
1877
|
messageMetadata?: METADATA;
|
|
1880
1878
|
} | {
|
|
1881
1879
|
type: 'abort';
|
|
@@ -3219,7 +3217,6 @@ type ChatOnDataCallback<UI_MESSAGE extends UIMessage> = (dataPart: DataUIPart<In
|
|
|
3219
3217
|
* @param isDisconnect Indicates whether the request has been ended by a network error.
|
|
3220
3218
|
* @param isError Indicates whether the request has been ended by an error.
|
|
3221
3219
|
* @param finishReason The reason why the generation finished.
|
|
3222
|
-
* @param usage Token usage information for the response.
|
|
3223
3220
|
*/
|
|
3224
3221
|
type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
|
|
3225
3222
|
message: UI_MESSAGE;
|
|
@@ -3228,7 +3225,6 @@ type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
|
|
|
3228
3225
|
isDisconnect: boolean;
|
|
3229
3226
|
isError: boolean;
|
|
3230
3227
|
finishReason?: FinishReason;
|
|
3231
|
-
usage?: LanguageModelUsage;
|
|
3232
3228
|
}) => void;
|
|
3233
3229
|
interface ChatInit<UI_MESSAGE extends UIMessage> {
|
|
3234
3230
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1749,7 +1749,6 @@ declare const uiMessageChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
|
1749
1749
|
} | {
|
|
1750
1750
|
type: "finish";
|
|
1751
1751
|
finishReason?: "length" | "error" | "stop" | "content-filter" | "tool-calls" | "other" | undefined;
|
|
1752
|
-
usage?: LanguageModelUsage | undefined;
|
|
1753
1752
|
messageMetadata?: unknown;
|
|
1754
1753
|
} | {
|
|
1755
1754
|
type: "abort";
|
|
@@ -1875,7 +1874,6 @@ type UIMessageChunk<METADATA = unknown, DATA_TYPES extends UIDataTypes = UIDataT
|
|
|
1875
1874
|
} | {
|
|
1876
1875
|
type: 'finish';
|
|
1877
1876
|
finishReason?: FinishReason;
|
|
1878
|
-
usage?: LanguageModelUsage;
|
|
1879
1877
|
messageMetadata?: METADATA;
|
|
1880
1878
|
} | {
|
|
1881
1879
|
type: 'abort';
|
|
@@ -3219,7 +3217,6 @@ type ChatOnDataCallback<UI_MESSAGE extends UIMessage> = (dataPart: DataUIPart<In
|
|
|
3219
3217
|
* @param isDisconnect Indicates whether the request has been ended by a network error.
|
|
3220
3218
|
* @param isError Indicates whether the request has been ended by an error.
|
|
3221
3219
|
* @param finishReason The reason why the generation finished.
|
|
3222
|
-
* @param usage Token usage information for the response.
|
|
3223
3220
|
*/
|
|
3224
3221
|
type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
|
|
3225
3222
|
message: UI_MESSAGE;
|
|
@@ -3228,7 +3225,6 @@ type ChatOnFinishCallback<UI_MESSAGE extends UIMessage> = (options: {
|
|
|
3228
3225
|
isDisconnect: boolean;
|
|
3229
3226
|
isError: boolean;
|
|
3230
3227
|
finishReason?: FinishReason;
|
|
3231
|
-
usage?: LanguageModelUsage;
|
|
3232
3228
|
}) => void;
|
|
3233
3229
|
interface ChatInit<UI_MESSAGE extends UIMessage> {
|
|
3234
3230
|
/**
|