ai 3.2.0 → 3.2.1

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 CHANGED
@@ -1,9 +1,10 @@
1
- import { JSONValue, CreateMessage, FunctionCall as FunctionCall$1, AssistantMessage, DataMessage } from '@ai-sdk/ui-utils';
2
- export { AssistantMessage, AssistantStatus, ChatRequest, ChatRequestOptions, CreateMessage, DataMessage, Function, FunctionCall, FunctionCallHandler, IdGenerator, JSONValue, Message, RequestOptions, StreamPart, Tool, ToolCall, ToolCallHandler, ToolChoice, ToolInvocation, UseAssistantOptions, formatStreamPart, parseComplexResponse, parseStreamPart, readDataStream } from '@ai-sdk/ui-utils';
1
+ import { DeepPartial, JSONValue, CreateMessage, FunctionCall as FunctionCall$1, AssistantMessage, DataMessage } from '@ai-sdk/ui-utils';
2
+ export { AssistantMessage, AssistantStatus, ChatRequest, ChatRequestOptions, CreateMessage, DataMessage, DeepPartial, Function, FunctionCall, FunctionCallHandler, IdGenerator, JSONValue, Message, RequestOptions, StreamPart, Tool, ToolCall, ToolCallHandler, ToolChoice, ToolInvocation, UseAssistantOptions, formatStreamPart, parseComplexResponse, parseStreamPart, readDataStream } from '@ai-sdk/ui-utils';
3
3
  import { EmbeddingModelV1, EmbeddingModelV1Embedding, LanguageModelV1, LanguageModelV1FinishReason, LanguageModelV1LogProbs, LanguageModelV1CallWarning } from '@ai-sdk/provider';
4
4
  export { APICallError, EmptyResponseBodyError, InvalidArgumentError, InvalidDataContentError, InvalidPromptError, InvalidResponseDataError, InvalidToolArgumentsError, JSONParseError, LoadAPIKeyError, NoObjectGeneratedError, NoSuchToolError, RetryError, ToolCallParseError, TypeValidationError, UnsupportedFunctionalityError, UnsupportedJSONSchemaError } from '@ai-sdk/provider';
5
5
  import { z } from 'zod';
6
- import { ServerResponse } from 'node:http';
6
+ import { ServerResponse } from 'http';
7
+ import { ServerResponse as ServerResponse$1 } from 'node:http';
7
8
  import { AssistantStream } from 'openai/lib/AssistantStream';
8
9
  import { Run } from 'openai/resources/beta/threads/runs/runs';
9
10
 
@@ -532,22 +533,6 @@ declare const experimental_generateObject: typeof generateObject;
532
533
 
533
534
  type AsyncIterableStream<T> = AsyncIterable<T> & ReadableStream<T>;
534
535
 
535
- /**
536
- Create a type from an object with all keys and nested keys set to optional.
537
- The helper supports normal objects and Zod schemas (which are resolved automatically).
538
- It always recurses into arrays.
539
-
540
- Adopted from [type-fest](https://github.com/sindresorhus/type-fest/tree/main) PartialDeep.
541
- */
542
- type DeepPartial<T> = T extends null | undefined | string | number | boolean | symbol | bigint | void | Date | RegExp | ((...arguments_: any[]) => unknown) | (new (...arguments_: any[]) => unknown) ? T : T extends Map<infer KeyType, infer ValueType> ? PartialMap<KeyType, ValueType> : T extends Set<infer ItemType> ? PartialSet<ItemType> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? PartialReadonlyMap<KeyType, ValueType> : T extends ReadonlySet<infer ItemType> ? PartialReadonlySet<ItemType> : T extends z.Schema<any> ? DeepPartial<T['_type']> : T extends object ? T extends ReadonlyArray<infer ItemType> ? ItemType[] extends T ? readonly ItemType[] extends T ? ReadonlyArray<DeepPartial<ItemType | undefined>> : Array<DeepPartial<ItemType | undefined>> : PartialObject<T> : PartialObject<T> : unknown;
543
- type PartialMap<KeyType, ValueType> = {} & Map<DeepPartial<KeyType>, DeepPartial<ValueType>>;
544
- type PartialSet<T> = {} & Set<DeepPartial<T>>;
545
- type PartialReadonlyMap<KeyType, ValueType> = {} & ReadonlyMap<DeepPartial<KeyType>, DeepPartial<ValueType>>;
546
- type PartialReadonlySet<T> = {} & ReadonlySet<DeepPartial<T>>;
547
- type PartialObject<ObjectType extends object> = {
548
- [KeyType in keyof ObjectType]?: DeepPartial<ObjectType[KeyType]>;
549
- };
550
-
551
536
  /**
552
537
  Generate a structured, typed object for a given prompt and schema using a language model.
553
538
 
@@ -655,6 +640,9 @@ type ObjectStreamInputPart = {
655
640
  type ObjectStreamPart<T> = ObjectStreamInputPart | {
656
641
  type: 'object';
657
642
  object: DeepPartial<T>;
643
+ } | {
644
+ type: 'text-delta';
645
+ textDelta: string;
658
646
  };
659
647
  /**
660
648
  The result of a `streamObject` call that contains the partial object stream and additional information.
@@ -691,8 +679,42 @@ declare class StreamObjectResult<T> {
691
679
  schema: z.Schema<T>;
692
680
  onFinish: Parameters<typeof streamObject<T>>[0]['onFinish'];
693
681
  });
682
+ /**
683
+ Stream of partial objects. It gets more complete as the stream progresses.
684
+
685
+ Note that the partial object is not validated.
686
+ If you want to be certain that the actual content matches your schema, you need to implement your own validation for partial results.
687
+ */
694
688
  get partialObjectStream(): AsyncIterableStream<DeepPartial<T>>;
689
+ /**
690
+ Text stream of the JSON representation of the generated object. It contains text chunks.
691
+ When the stream is finished, the object is valid JSON that can be parsed.
692
+ */
693
+ get textStream(): AsyncIterableStream<string>;
694
+ /**
695
+ Stream of different types of events, including partial objects, errors, and finish events.
696
+ */
695
697
  get fullStream(): AsyncIterableStream<ObjectStreamPart<T>>;
698
+ /**
699
+ Writes text delta output to a Node.js response-like object.
700
+ It sets a `Content-Type` header to `text/plain; charset=utf-8` and
701
+ writes each text delta as a separate chunk.
702
+
703
+ @param response A Node.js response-like object (ServerResponse).
704
+ @param init Optional headers and status code.
705
+ */
706
+ pipeTextStreamToResponse(response: ServerResponse, init?: {
707
+ headers?: Record<string, string>;
708
+ status?: number;
709
+ }): void;
710
+ /**
711
+ Creates a simple text stream response.
712
+ Each text delta is encoded as UTF-8 and sent as a separate chunk.
713
+ Non-text-delta events are ignored.
714
+
715
+ @param init Optional headers and status code.
716
+ */
717
+ toTextStreamResponse(init?: ResponseInit): Response;
696
718
  }
697
719
  /**
698
720
  * @deprecated Use `streamObject` instead.
@@ -1195,7 +1217,7 @@ declare class StreamTextResult<TOOLS extends Record<string, CoreTool>> {
1195
1217
  @param response A Node.js response-like object (ServerResponse).
1196
1218
  @param init Optional headers and status code.
1197
1219
  */
1198
- pipeAIStreamToResponse(response: ServerResponse, init?: {
1220
+ pipeAIStreamToResponse(response: ServerResponse$1, init?: {
1199
1221
  headers?: Record<string, string>;
1200
1222
  status?: number;
1201
1223
  }): void;
@@ -1207,7 +1229,7 @@ declare class StreamTextResult<TOOLS extends Record<string, CoreTool>> {
1207
1229
  @param response A Node.js response-like object (ServerResponse).
1208
1230
  @param init Optional headers and status code.
1209
1231
  */
1210
- pipeTextStreamToResponse(response: ServerResponse, init?: {
1232
+ pipeTextStreamToResponse(response: ServerResponse$1, init?: {
1211
1233
  headers?: Record<string, string>;
1212
1234
  status?: number;
1213
1235
  }): void;
@@ -2063,7 +2085,7 @@ declare class experimental_StreamData extends StreamData {
2063
2085
  /**
2064
2086
  * A utility function to stream a ReadableStream to a Node.js response-like object.
2065
2087
  */
2066
- declare function streamToResponse(res: ReadableStream, response: ServerResponse, init?: {
2088
+ declare function streamToResponse(res: ReadableStream, response: ServerResponse$1, init?: {
2067
2089
  headers?: Record<string, string>;
2068
2090
  status?: number;
2069
2091
  }, data?: StreamData): void;
@@ -2081,4 +2103,4 @@ declare const generateId: (size?: number | undefined) => string;
2081
2103
  */
2082
2104
  declare const nanoid: (size?: number | undefined) => string;
2083
2105
 
2084
- export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantResponse, CallWarning, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolChoice, CoreToolMessage, CoreUserMessage, DataContent, DeepPartial, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, InvalidMessageRoleError, InvalidModelIdError, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, MistralStream, NoSuchModelError, NoSuchProviderError, ObjectStreamInputPart, ObjectStreamPart, OpenAIStream, OpenAIStreamCallbacks, ReplicateStream, StreamData, StreamObjectResult, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, TokenUsage, ToolCallPart, ToolCallPayload, ToolContent, ToolResultPart, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, cosineSimilarity, createCallbacksTransformer, createEventStreamTransformer, createStreamDataTransformer, embed, embedMany, experimental_AssistantResponse, experimental_ModelRegistry, experimental_ProviderRegistry, experimental_StreamData, experimental_createModelRegistry, experimental_createProviderRegistry, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, generateId, generateObject, generateText, nanoid, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
2106
+ export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantResponse, CallWarning, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolChoice, CoreToolMessage, CoreUserMessage, DataContent, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, InvalidMessageRoleError, InvalidModelIdError, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, MistralStream, NoSuchModelError, NoSuchProviderError, ObjectStreamInputPart, ObjectStreamPart, OpenAIStream, OpenAIStreamCallbacks, ReplicateStream, StreamData, StreamObjectResult, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, TokenUsage, ToolCallPart, ToolCallPayload, ToolContent, ToolResultPart, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, cosineSimilarity, createCallbacksTransformer, createEventStreamTransformer, createStreamDataTransformer, embed, embedMany, experimental_AssistantResponse, experimental_ModelRegistry, experimental_ProviderRegistry, experimental_StreamData, experimental_createModelRegistry, experimental_createProviderRegistry, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, generateId, generateObject, generateText, nanoid, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { JSONValue, CreateMessage, FunctionCall as FunctionCall$1, AssistantMessage, DataMessage } from '@ai-sdk/ui-utils';
2
- export { AssistantMessage, AssistantStatus, ChatRequest, ChatRequestOptions, CreateMessage, DataMessage, Function, FunctionCall, FunctionCallHandler, IdGenerator, JSONValue, Message, RequestOptions, StreamPart, Tool, ToolCall, ToolCallHandler, ToolChoice, ToolInvocation, UseAssistantOptions, formatStreamPart, parseComplexResponse, parseStreamPart, readDataStream } from '@ai-sdk/ui-utils';
1
+ import { DeepPartial, JSONValue, CreateMessage, FunctionCall as FunctionCall$1, AssistantMessage, DataMessage } from '@ai-sdk/ui-utils';
2
+ export { AssistantMessage, AssistantStatus, ChatRequest, ChatRequestOptions, CreateMessage, DataMessage, DeepPartial, Function, FunctionCall, FunctionCallHandler, IdGenerator, JSONValue, Message, RequestOptions, StreamPart, Tool, ToolCall, ToolCallHandler, ToolChoice, ToolInvocation, UseAssistantOptions, formatStreamPart, parseComplexResponse, parseStreamPart, readDataStream } from '@ai-sdk/ui-utils';
3
3
  import { EmbeddingModelV1, EmbeddingModelV1Embedding, LanguageModelV1, LanguageModelV1FinishReason, LanguageModelV1LogProbs, LanguageModelV1CallWarning } from '@ai-sdk/provider';
4
4
  export { APICallError, EmptyResponseBodyError, InvalidArgumentError, InvalidDataContentError, InvalidPromptError, InvalidResponseDataError, InvalidToolArgumentsError, JSONParseError, LoadAPIKeyError, NoObjectGeneratedError, NoSuchToolError, RetryError, ToolCallParseError, TypeValidationError, UnsupportedFunctionalityError, UnsupportedJSONSchemaError } from '@ai-sdk/provider';
5
5
  import { z } from 'zod';
6
- import { ServerResponse } from 'node:http';
6
+ import { ServerResponse } from 'http';
7
+ import { ServerResponse as ServerResponse$1 } from 'node:http';
7
8
  import { AssistantStream } from 'openai/lib/AssistantStream';
8
9
  import { Run } from 'openai/resources/beta/threads/runs/runs';
9
10
 
@@ -532,22 +533,6 @@ declare const experimental_generateObject: typeof generateObject;
532
533
 
533
534
  type AsyncIterableStream<T> = AsyncIterable<T> & ReadableStream<T>;
534
535
 
535
- /**
536
- Create a type from an object with all keys and nested keys set to optional.
537
- The helper supports normal objects and Zod schemas (which are resolved automatically).
538
- It always recurses into arrays.
539
-
540
- Adopted from [type-fest](https://github.com/sindresorhus/type-fest/tree/main) PartialDeep.
541
- */
542
- type DeepPartial<T> = T extends null | undefined | string | number | boolean | symbol | bigint | void | Date | RegExp | ((...arguments_: any[]) => unknown) | (new (...arguments_: any[]) => unknown) ? T : T extends Map<infer KeyType, infer ValueType> ? PartialMap<KeyType, ValueType> : T extends Set<infer ItemType> ? PartialSet<ItemType> : T extends ReadonlyMap<infer KeyType, infer ValueType> ? PartialReadonlyMap<KeyType, ValueType> : T extends ReadonlySet<infer ItemType> ? PartialReadonlySet<ItemType> : T extends z.Schema<any> ? DeepPartial<T['_type']> : T extends object ? T extends ReadonlyArray<infer ItemType> ? ItemType[] extends T ? readonly ItemType[] extends T ? ReadonlyArray<DeepPartial<ItemType | undefined>> : Array<DeepPartial<ItemType | undefined>> : PartialObject<T> : PartialObject<T> : unknown;
543
- type PartialMap<KeyType, ValueType> = {} & Map<DeepPartial<KeyType>, DeepPartial<ValueType>>;
544
- type PartialSet<T> = {} & Set<DeepPartial<T>>;
545
- type PartialReadonlyMap<KeyType, ValueType> = {} & ReadonlyMap<DeepPartial<KeyType>, DeepPartial<ValueType>>;
546
- type PartialReadonlySet<T> = {} & ReadonlySet<DeepPartial<T>>;
547
- type PartialObject<ObjectType extends object> = {
548
- [KeyType in keyof ObjectType]?: DeepPartial<ObjectType[KeyType]>;
549
- };
550
-
551
536
  /**
552
537
  Generate a structured, typed object for a given prompt and schema using a language model.
553
538
 
@@ -655,6 +640,9 @@ type ObjectStreamInputPart = {
655
640
  type ObjectStreamPart<T> = ObjectStreamInputPart | {
656
641
  type: 'object';
657
642
  object: DeepPartial<T>;
643
+ } | {
644
+ type: 'text-delta';
645
+ textDelta: string;
658
646
  };
659
647
  /**
660
648
  The result of a `streamObject` call that contains the partial object stream and additional information.
@@ -691,8 +679,42 @@ declare class StreamObjectResult<T> {
691
679
  schema: z.Schema<T>;
692
680
  onFinish: Parameters<typeof streamObject<T>>[0]['onFinish'];
693
681
  });
682
+ /**
683
+ Stream of partial objects. It gets more complete as the stream progresses.
684
+
685
+ Note that the partial object is not validated.
686
+ If you want to be certain that the actual content matches your schema, you need to implement your own validation for partial results.
687
+ */
694
688
  get partialObjectStream(): AsyncIterableStream<DeepPartial<T>>;
689
+ /**
690
+ Text stream of the JSON representation of the generated object. It contains text chunks.
691
+ When the stream is finished, the object is valid JSON that can be parsed.
692
+ */
693
+ get textStream(): AsyncIterableStream<string>;
694
+ /**
695
+ Stream of different types of events, including partial objects, errors, and finish events.
696
+ */
695
697
  get fullStream(): AsyncIterableStream<ObjectStreamPart<T>>;
698
+ /**
699
+ Writes text delta output to a Node.js response-like object.
700
+ It sets a `Content-Type` header to `text/plain; charset=utf-8` and
701
+ writes each text delta as a separate chunk.
702
+
703
+ @param response A Node.js response-like object (ServerResponse).
704
+ @param init Optional headers and status code.
705
+ */
706
+ pipeTextStreamToResponse(response: ServerResponse, init?: {
707
+ headers?: Record<string, string>;
708
+ status?: number;
709
+ }): void;
710
+ /**
711
+ Creates a simple text stream response.
712
+ Each text delta is encoded as UTF-8 and sent as a separate chunk.
713
+ Non-text-delta events are ignored.
714
+
715
+ @param init Optional headers and status code.
716
+ */
717
+ toTextStreamResponse(init?: ResponseInit): Response;
696
718
  }
697
719
  /**
698
720
  * @deprecated Use `streamObject` instead.
@@ -1195,7 +1217,7 @@ declare class StreamTextResult<TOOLS extends Record<string, CoreTool>> {
1195
1217
  @param response A Node.js response-like object (ServerResponse).
1196
1218
  @param init Optional headers and status code.
1197
1219
  */
1198
- pipeAIStreamToResponse(response: ServerResponse, init?: {
1220
+ pipeAIStreamToResponse(response: ServerResponse$1, init?: {
1199
1221
  headers?: Record<string, string>;
1200
1222
  status?: number;
1201
1223
  }): void;
@@ -1207,7 +1229,7 @@ declare class StreamTextResult<TOOLS extends Record<string, CoreTool>> {
1207
1229
  @param response A Node.js response-like object (ServerResponse).
1208
1230
  @param init Optional headers and status code.
1209
1231
  */
1210
- pipeTextStreamToResponse(response: ServerResponse, init?: {
1232
+ pipeTextStreamToResponse(response: ServerResponse$1, init?: {
1211
1233
  headers?: Record<string, string>;
1212
1234
  status?: number;
1213
1235
  }): void;
@@ -2063,7 +2085,7 @@ declare class experimental_StreamData extends StreamData {
2063
2085
  /**
2064
2086
  * A utility function to stream a ReadableStream to a Node.js response-like object.
2065
2087
  */
2066
- declare function streamToResponse(res: ReadableStream, response: ServerResponse, init?: {
2088
+ declare function streamToResponse(res: ReadableStream, response: ServerResponse$1, init?: {
2067
2089
  headers?: Record<string, string>;
2068
2090
  status?: number;
2069
2091
  }, data?: StreamData): void;
@@ -2081,4 +2103,4 @@ declare const generateId: (size?: number | undefined) => string;
2081
2103
  */
2082
2104
  declare const nanoid: (size?: number | undefined) => string;
2083
2105
 
2084
- export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantResponse, CallWarning, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolChoice, CoreToolMessage, CoreUserMessage, DataContent, DeepPartial, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, InvalidMessageRoleError, InvalidModelIdError, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, MistralStream, NoSuchModelError, NoSuchProviderError, ObjectStreamInputPart, ObjectStreamPart, OpenAIStream, OpenAIStreamCallbacks, ReplicateStream, StreamData, StreamObjectResult, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, TokenUsage, ToolCallPart, ToolCallPayload, ToolContent, ToolResultPart, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, cosineSimilarity, createCallbacksTransformer, createEventStreamTransformer, createStreamDataTransformer, embed, embedMany, experimental_AssistantResponse, experimental_ModelRegistry, experimental_ProviderRegistry, experimental_StreamData, experimental_createModelRegistry, experimental_createProviderRegistry, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, generateId, generateObject, generateText, nanoid, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
2106
+ export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantResponse, CallWarning, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolChoice, CoreToolMessage, CoreUserMessage, DataContent, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, InvalidMessageRoleError, InvalidModelIdError, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, MistralStream, NoSuchModelError, NoSuchProviderError, ObjectStreamInputPart, ObjectStreamPart, OpenAIStream, OpenAIStreamCallbacks, ReplicateStream, StreamData, StreamObjectResult, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, TokenUsage, ToolCallPart, ToolCallPayload, ToolContent, ToolResultPart, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, cosineSimilarity, createCallbacksTransformer, createEventStreamTransformer, createStreamDataTransformer, embed, embedMany, experimental_AssistantResponse, experimental_ModelRegistry, experimental_ProviderRegistry, experimental_StreamData, experimental_createModelRegistry, experimental_createProviderRegistry, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, generateId, generateObject, generateText, nanoid, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };