ai 3.1.7 → 3.1.9
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 +132 -29
- package/dist/index.d.ts +132 -29
- package/dist/index.js +114 -82
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -62
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/react/dist/index.d.mts +34 -33
- package/react/dist/index.d.ts +34 -33
- package/react/dist/index.js +1 -2
- package/react/dist/index.js.map +1 -1
- package/react/dist/index.mjs +1 -2
- package/react/dist/index.mjs.map +1 -1
- package/rsc/dist/rsc-server.mjs +62 -62
- package/rsc/dist/rsc-server.mjs.map +1 -1
- package/svelte/dist/index.d.mts +80 -1
- package/svelte/dist/index.d.ts +80 -1
- package/svelte/dist/index.js +152 -0
- package/svelte/dist/index.js.map +1 -1
- package/svelte/dist/index.mjs +151 -0
- package/svelte/dist/index.mjs.map +1 -1
package/dist/index.d.mts
CHANGED
@@ -1,10 +1,107 @@
|
|
1
|
-
import {
|
2
|
-
import { LanguageModelV1, LanguageModelV1FinishReason, LanguageModelV1LogProbs, LanguageModelV1CallWarning } from '@ai-sdk/provider';
|
1
|
+
import { EmbeddingModelV1, EmbeddingModelV1Embedding, LanguageModelV1, LanguageModelV1FinishReason, LanguageModelV1LogProbs, LanguageModelV1CallWarning } from '@ai-sdk/provider';
|
3
2
|
export { APICallError, EmptyResponseBodyError, InvalidArgumentError, InvalidDataContentError, InvalidPromptError, InvalidResponseDataError, InvalidToolArgumentsError, JSONParseError, LoadAPIKeyError, NoObjectGeneratedError, NoSuchToolError, RetryError, ToolCallParseError, TypeValidationError, UnsupportedFunctionalityError, UnsupportedJSONSchemaError } from '@ai-sdk/provider';
|
3
|
+
import { z } from 'zod';
|
4
4
|
import { ServerResponse } from 'node:http';
|
5
5
|
import { AssistantStream } from 'openai/lib/AssistantStream';
|
6
6
|
import { Run } from 'openai/resources/beta/threads/runs/runs';
|
7
7
|
|
8
|
+
/**
|
9
|
+
Embedding model that is used by the AI SDK Core functions.
|
10
|
+
*/
|
11
|
+
type EmbeddingModel<VALUE> = EmbeddingModelV1<VALUE>;
|
12
|
+
/**
|
13
|
+
Embedding.
|
14
|
+
*/
|
15
|
+
type Embedding = EmbeddingModelV1Embedding;
|
16
|
+
|
17
|
+
/**
|
18
|
+
Language model that is used by the AI SDK Core functions.
|
19
|
+
*/
|
20
|
+
type LanguageModel = LanguageModelV1;
|
21
|
+
/**
|
22
|
+
Reason why a language model finished generating a response.
|
23
|
+
|
24
|
+
Can be one of the following:
|
25
|
+
- `stop`: model generated stop sequence
|
26
|
+
- `length`: model generated maximum number of tokens
|
27
|
+
- `content-filter`: content filter violation stopped the model
|
28
|
+
- `tool-calls`: model triggered tool calls
|
29
|
+
- `error`: model stopped because of an error
|
30
|
+
- `other`: model stopped for other reasons
|
31
|
+
*/
|
32
|
+
type FinishReason = LanguageModelV1FinishReason;
|
33
|
+
/**
|
34
|
+
Log probabilities for each token and its top log probabilities.
|
35
|
+
*/
|
36
|
+
type LogProbs = LanguageModelV1LogProbs;
|
37
|
+
/**
|
38
|
+
Warning from the model provider for this call. The call will proceed, but e.g.
|
39
|
+
some settings might not be supported, which can lead to suboptimal results.
|
40
|
+
*/
|
41
|
+
type CallWarning = LanguageModelV1CallWarning;
|
42
|
+
|
43
|
+
/**
|
44
|
+
Embed a value using an embedding model. The type of the value is defined by the embedding model.
|
45
|
+
|
46
|
+
@param model - The embedding model to use.
|
47
|
+
@param value - The value that should be embedded.
|
48
|
+
|
49
|
+
@param maxRetries - Maximum number of retries. Set to 0 to disable retries. Default: 2.
|
50
|
+
@param abortSignal - An optional abort signal that can be used to cancel the call.
|
51
|
+
|
52
|
+
@returns A result object that contains the embedding, the value, and additional information.
|
53
|
+
*/
|
54
|
+
declare function embed<VALUE>({ model, value, maxRetries, abortSignal, }: {
|
55
|
+
/**
|
56
|
+
The embedding model to use.
|
57
|
+
*/
|
58
|
+
model: EmbeddingModel<VALUE>;
|
59
|
+
/**
|
60
|
+
The value that should be embedded.
|
61
|
+
*/
|
62
|
+
value: VALUE;
|
63
|
+
/**
|
64
|
+
Maximum number of retries per embedding model call. Set to 0 to disable retries.
|
65
|
+
|
66
|
+
@default 2
|
67
|
+
*/
|
68
|
+
maxRetries?: number;
|
69
|
+
/**
|
70
|
+
Abort signal.
|
71
|
+
*/
|
72
|
+
abortSignal?: AbortSignal;
|
73
|
+
}): Promise<EmbedResult<VALUE>>;
|
74
|
+
/**
|
75
|
+
The result of a `embed` call.
|
76
|
+
It contains the embedding, the value, and additional information.
|
77
|
+
*/
|
78
|
+
declare class EmbedResult<VALUE> {
|
79
|
+
/**
|
80
|
+
The value that was embedded.
|
81
|
+
*/
|
82
|
+
readonly value: VALUE;
|
83
|
+
/**
|
84
|
+
The embedding of the value.
|
85
|
+
*/
|
86
|
+
readonly embedding: Embedding;
|
87
|
+
/**
|
88
|
+
Optional raw response data.
|
89
|
+
*/
|
90
|
+
readonly rawResponse?: {
|
91
|
+
/**
|
92
|
+
Response headers.
|
93
|
+
*/
|
94
|
+
headers?: Record<string, string>;
|
95
|
+
};
|
96
|
+
constructor(options: {
|
97
|
+
value: VALUE;
|
98
|
+
embedding: Embedding;
|
99
|
+
rawResponse?: {
|
100
|
+
headers?: Record<string, string>;
|
101
|
+
};
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
8
105
|
type TokenUsage = {
|
9
106
|
promptTokens: number;
|
10
107
|
completionTokens: number;
|
@@ -242,32 +339,6 @@ type Prompt = {
|
|
242
339
|
messages?: Array<CoreMessage>;
|
243
340
|
};
|
244
341
|
|
245
|
-
/**
|
246
|
-
Language model that is used by the AI SDK Core functions.
|
247
|
-
*/
|
248
|
-
type LanguageModel = LanguageModelV1;
|
249
|
-
/**
|
250
|
-
Reason why a language model finished generating a response.
|
251
|
-
|
252
|
-
Can be one of the following:
|
253
|
-
- `stop`: model generated stop sequence
|
254
|
-
- `length`: model generated maximum number of tokens
|
255
|
-
- `content-filter`: content filter violation stopped the model
|
256
|
-
- `tool-calls`: model triggered tool calls
|
257
|
-
- `error`: model stopped because of an error
|
258
|
-
- `other`: model stopped for other reasons
|
259
|
-
*/
|
260
|
-
type FinishReason = LanguageModelV1FinishReason;
|
261
|
-
/**
|
262
|
-
Log probabilities for each token and its top log probabilities.
|
263
|
-
*/
|
264
|
-
type LogProbs = LanguageModelV1LogProbs;
|
265
|
-
/**
|
266
|
-
Warning from the model provider for this call. The call will proceed, but e.g.
|
267
|
-
some settings might not be supported, which can lead to suboptimal results.
|
268
|
-
*/
|
269
|
-
type CallWarning = LanguageModelV1CallWarning;
|
270
|
-
|
271
342
|
/**
|
272
343
|
Generate a structured, typed object for a given prompt and schema using a language model.
|
273
344
|
|
@@ -952,6 +1023,38 @@ declare function convertToCoreMessages(messages: Array<{
|
|
952
1023
|
toolInvocations?: Array<ToolResult<string, unknown, unknown>>;
|
953
1024
|
}>): CoreMessage[];
|
954
1025
|
|
1026
|
+
type AssistantStatus = 'in_progress' | 'awaiting_message';
|
1027
|
+
type UseAssistantOptions = {
|
1028
|
+
/**
|
1029
|
+
* The API endpoint that accepts a `{ threadId: string | null; message: string; }` object and returns an `AssistantResponse` stream.
|
1030
|
+
* The threadId refers to an existing thread with messages (or is `null` to create a new thread).
|
1031
|
+
* The message is the next message that should be appended to the thread and sent to the assistant.
|
1032
|
+
*/
|
1033
|
+
api: string;
|
1034
|
+
/**
|
1035
|
+
* An optional string that represents the ID of an existing thread.
|
1036
|
+
* If not provided, a new thread will be created.
|
1037
|
+
*/
|
1038
|
+
threadId?: string;
|
1039
|
+
/**
|
1040
|
+
* An optional literal that sets the mode of credentials to be used on the request.
|
1041
|
+
* Defaults to "same-origin".
|
1042
|
+
*/
|
1043
|
+
credentials?: RequestCredentials;
|
1044
|
+
/**
|
1045
|
+
* An optional object of headers to be passed to the API endpoint.
|
1046
|
+
*/
|
1047
|
+
headers?: Record<string, string> | Headers;
|
1048
|
+
/**
|
1049
|
+
* An optional, additional body object to be passed to the API endpoint.
|
1050
|
+
*/
|
1051
|
+
body?: object;
|
1052
|
+
/**
|
1053
|
+
* An optional callback that will be called when the assistant encounters an error.
|
1054
|
+
*/
|
1055
|
+
onError?: (error: Error) => void;
|
1056
|
+
};
|
1057
|
+
|
955
1058
|
interface FunctionCall$1 {
|
956
1059
|
/**
|
957
1060
|
* The arguments to call the function with, as generated by the model in JSON
|
@@ -2113,4 +2216,4 @@ declare function streamToResponse(res: ReadableStream, response: ServerResponse,
|
|
2113
2216
|
status?: number;
|
2114
2217
|
}): void;
|
2115
2218
|
|
2116
|
-
export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantMessage, AssistantResponse, CallWarning, ChatRequest, ChatRequestOptions, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolMessage, CoreUserMessage, CreateMessage, DataContent, DataMessage, DeepPartial, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, Function, FunctionCall$1 as FunctionCall, FunctionCallHandler, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, IdGenerator, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, JSONValue, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, Message$1 as Message, MistralStream, ObjectStreamPart, ObjectStreamPartInput, OpenAIStream, OpenAIStreamCallbacks, ReactResponseRow, ReplicateStream, RequestOptions, StreamData, StreamObjectResult, StreamPart, StreamString, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, Tool, ToolCall, ToolCallHandler, ToolCallPart, ToolCallPayload, ToolChoice, ToolContent, ToolInvocation, ToolResultPart, UseChatOptions, UseCompletionOptions, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, createCallbacksTransformer, createChunkDecoder, createEventStreamTransformer, createStreamDataTransformer, experimental_AssistantResponse, experimental_StreamData, experimental_StreamingReactResponse, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, formatStreamPart, generateId, generateObject, generateText, isStreamStringEqualToType, generateId as nanoid, parseStreamPart, readDataStream, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
|
2219
|
+
export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantMessage, AssistantResponse, AssistantStatus, CallWarning, ChatRequest, ChatRequestOptions, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolMessage, CoreUserMessage, CreateMessage, DataContent, DataMessage, DeepPartial, EmbedResult, Embedding, EmbeddingModel, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, Function, FunctionCall$1 as FunctionCall, FunctionCallHandler, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, IdGenerator, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, JSONValue, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, Message$1 as Message, MistralStream, ObjectStreamPart, ObjectStreamPartInput, OpenAIStream, OpenAIStreamCallbacks, ReactResponseRow, ReplicateStream, RequestOptions, StreamData, StreamObjectResult, StreamPart, StreamString, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, Tool, ToolCall, ToolCallHandler, ToolCallPart, ToolCallPayload, ToolChoice, ToolContent, ToolInvocation, ToolResultPart, UseAssistantOptions, UseChatOptions, UseCompletionOptions, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, createCallbacksTransformer, createChunkDecoder, createEventStreamTransformer, createStreamDataTransformer, embed, experimental_AssistantResponse, experimental_StreamData, experimental_StreamingReactResponse, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, formatStreamPart, generateId, generateObject, generateText, isStreamStringEqualToType, generateId as nanoid, parseStreamPart, readDataStream, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
|
package/dist/index.d.ts
CHANGED
@@ -1,10 +1,107 @@
|
|
1
|
-
import {
|
2
|
-
import { LanguageModelV1, LanguageModelV1FinishReason, LanguageModelV1LogProbs, LanguageModelV1CallWarning } from '@ai-sdk/provider';
|
1
|
+
import { EmbeddingModelV1, EmbeddingModelV1Embedding, LanguageModelV1, LanguageModelV1FinishReason, LanguageModelV1LogProbs, LanguageModelV1CallWarning } from '@ai-sdk/provider';
|
3
2
|
export { APICallError, EmptyResponseBodyError, InvalidArgumentError, InvalidDataContentError, InvalidPromptError, InvalidResponseDataError, InvalidToolArgumentsError, JSONParseError, LoadAPIKeyError, NoObjectGeneratedError, NoSuchToolError, RetryError, ToolCallParseError, TypeValidationError, UnsupportedFunctionalityError, UnsupportedJSONSchemaError } from '@ai-sdk/provider';
|
3
|
+
import { z } from 'zod';
|
4
4
|
import { ServerResponse } from 'node:http';
|
5
5
|
import { AssistantStream } from 'openai/lib/AssistantStream';
|
6
6
|
import { Run } from 'openai/resources/beta/threads/runs/runs';
|
7
7
|
|
8
|
+
/**
|
9
|
+
Embedding model that is used by the AI SDK Core functions.
|
10
|
+
*/
|
11
|
+
type EmbeddingModel<VALUE> = EmbeddingModelV1<VALUE>;
|
12
|
+
/**
|
13
|
+
Embedding.
|
14
|
+
*/
|
15
|
+
type Embedding = EmbeddingModelV1Embedding;
|
16
|
+
|
17
|
+
/**
|
18
|
+
Language model that is used by the AI SDK Core functions.
|
19
|
+
*/
|
20
|
+
type LanguageModel = LanguageModelV1;
|
21
|
+
/**
|
22
|
+
Reason why a language model finished generating a response.
|
23
|
+
|
24
|
+
Can be one of the following:
|
25
|
+
- `stop`: model generated stop sequence
|
26
|
+
- `length`: model generated maximum number of tokens
|
27
|
+
- `content-filter`: content filter violation stopped the model
|
28
|
+
- `tool-calls`: model triggered tool calls
|
29
|
+
- `error`: model stopped because of an error
|
30
|
+
- `other`: model stopped for other reasons
|
31
|
+
*/
|
32
|
+
type FinishReason = LanguageModelV1FinishReason;
|
33
|
+
/**
|
34
|
+
Log probabilities for each token and its top log probabilities.
|
35
|
+
*/
|
36
|
+
type LogProbs = LanguageModelV1LogProbs;
|
37
|
+
/**
|
38
|
+
Warning from the model provider for this call. The call will proceed, but e.g.
|
39
|
+
some settings might not be supported, which can lead to suboptimal results.
|
40
|
+
*/
|
41
|
+
type CallWarning = LanguageModelV1CallWarning;
|
42
|
+
|
43
|
+
/**
|
44
|
+
Embed a value using an embedding model. The type of the value is defined by the embedding model.
|
45
|
+
|
46
|
+
@param model - The embedding model to use.
|
47
|
+
@param value - The value that should be embedded.
|
48
|
+
|
49
|
+
@param maxRetries - Maximum number of retries. Set to 0 to disable retries. Default: 2.
|
50
|
+
@param abortSignal - An optional abort signal that can be used to cancel the call.
|
51
|
+
|
52
|
+
@returns A result object that contains the embedding, the value, and additional information.
|
53
|
+
*/
|
54
|
+
declare function embed<VALUE>({ model, value, maxRetries, abortSignal, }: {
|
55
|
+
/**
|
56
|
+
The embedding model to use.
|
57
|
+
*/
|
58
|
+
model: EmbeddingModel<VALUE>;
|
59
|
+
/**
|
60
|
+
The value that should be embedded.
|
61
|
+
*/
|
62
|
+
value: VALUE;
|
63
|
+
/**
|
64
|
+
Maximum number of retries per embedding model call. Set to 0 to disable retries.
|
65
|
+
|
66
|
+
@default 2
|
67
|
+
*/
|
68
|
+
maxRetries?: number;
|
69
|
+
/**
|
70
|
+
Abort signal.
|
71
|
+
*/
|
72
|
+
abortSignal?: AbortSignal;
|
73
|
+
}): Promise<EmbedResult<VALUE>>;
|
74
|
+
/**
|
75
|
+
The result of a `embed` call.
|
76
|
+
It contains the embedding, the value, and additional information.
|
77
|
+
*/
|
78
|
+
declare class EmbedResult<VALUE> {
|
79
|
+
/**
|
80
|
+
The value that was embedded.
|
81
|
+
*/
|
82
|
+
readonly value: VALUE;
|
83
|
+
/**
|
84
|
+
The embedding of the value.
|
85
|
+
*/
|
86
|
+
readonly embedding: Embedding;
|
87
|
+
/**
|
88
|
+
Optional raw response data.
|
89
|
+
*/
|
90
|
+
readonly rawResponse?: {
|
91
|
+
/**
|
92
|
+
Response headers.
|
93
|
+
*/
|
94
|
+
headers?: Record<string, string>;
|
95
|
+
};
|
96
|
+
constructor(options: {
|
97
|
+
value: VALUE;
|
98
|
+
embedding: Embedding;
|
99
|
+
rawResponse?: {
|
100
|
+
headers?: Record<string, string>;
|
101
|
+
};
|
102
|
+
});
|
103
|
+
}
|
104
|
+
|
8
105
|
type TokenUsage = {
|
9
106
|
promptTokens: number;
|
10
107
|
completionTokens: number;
|
@@ -242,32 +339,6 @@ type Prompt = {
|
|
242
339
|
messages?: Array<CoreMessage>;
|
243
340
|
};
|
244
341
|
|
245
|
-
/**
|
246
|
-
Language model that is used by the AI SDK Core functions.
|
247
|
-
*/
|
248
|
-
type LanguageModel = LanguageModelV1;
|
249
|
-
/**
|
250
|
-
Reason why a language model finished generating a response.
|
251
|
-
|
252
|
-
Can be one of the following:
|
253
|
-
- `stop`: model generated stop sequence
|
254
|
-
- `length`: model generated maximum number of tokens
|
255
|
-
- `content-filter`: content filter violation stopped the model
|
256
|
-
- `tool-calls`: model triggered tool calls
|
257
|
-
- `error`: model stopped because of an error
|
258
|
-
- `other`: model stopped for other reasons
|
259
|
-
*/
|
260
|
-
type FinishReason = LanguageModelV1FinishReason;
|
261
|
-
/**
|
262
|
-
Log probabilities for each token and its top log probabilities.
|
263
|
-
*/
|
264
|
-
type LogProbs = LanguageModelV1LogProbs;
|
265
|
-
/**
|
266
|
-
Warning from the model provider for this call. The call will proceed, but e.g.
|
267
|
-
some settings might not be supported, which can lead to suboptimal results.
|
268
|
-
*/
|
269
|
-
type CallWarning = LanguageModelV1CallWarning;
|
270
|
-
|
271
342
|
/**
|
272
343
|
Generate a structured, typed object for a given prompt and schema using a language model.
|
273
344
|
|
@@ -952,6 +1023,38 @@ declare function convertToCoreMessages(messages: Array<{
|
|
952
1023
|
toolInvocations?: Array<ToolResult<string, unknown, unknown>>;
|
953
1024
|
}>): CoreMessage[];
|
954
1025
|
|
1026
|
+
type AssistantStatus = 'in_progress' | 'awaiting_message';
|
1027
|
+
type UseAssistantOptions = {
|
1028
|
+
/**
|
1029
|
+
* The API endpoint that accepts a `{ threadId: string | null; message: string; }` object and returns an `AssistantResponse` stream.
|
1030
|
+
* The threadId refers to an existing thread with messages (or is `null` to create a new thread).
|
1031
|
+
* The message is the next message that should be appended to the thread and sent to the assistant.
|
1032
|
+
*/
|
1033
|
+
api: string;
|
1034
|
+
/**
|
1035
|
+
* An optional string that represents the ID of an existing thread.
|
1036
|
+
* If not provided, a new thread will be created.
|
1037
|
+
*/
|
1038
|
+
threadId?: string;
|
1039
|
+
/**
|
1040
|
+
* An optional literal that sets the mode of credentials to be used on the request.
|
1041
|
+
* Defaults to "same-origin".
|
1042
|
+
*/
|
1043
|
+
credentials?: RequestCredentials;
|
1044
|
+
/**
|
1045
|
+
* An optional object of headers to be passed to the API endpoint.
|
1046
|
+
*/
|
1047
|
+
headers?: Record<string, string> | Headers;
|
1048
|
+
/**
|
1049
|
+
* An optional, additional body object to be passed to the API endpoint.
|
1050
|
+
*/
|
1051
|
+
body?: object;
|
1052
|
+
/**
|
1053
|
+
* An optional callback that will be called when the assistant encounters an error.
|
1054
|
+
*/
|
1055
|
+
onError?: (error: Error) => void;
|
1056
|
+
};
|
1057
|
+
|
955
1058
|
interface FunctionCall$1 {
|
956
1059
|
/**
|
957
1060
|
* The arguments to call the function with, as generated by the model in JSON
|
@@ -2113,4 +2216,4 @@ declare function streamToResponse(res: ReadableStream, response: ServerResponse,
|
|
2113
2216
|
status?: number;
|
2114
2217
|
}): void;
|
2115
2218
|
|
2116
|
-
export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantMessage, AssistantResponse, CallWarning, ChatRequest, ChatRequestOptions, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolMessage, CoreUserMessage, CreateMessage, DataContent, DataMessage, DeepPartial, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, Function, FunctionCall$1 as FunctionCall, FunctionCallHandler, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, IdGenerator, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, JSONValue, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, Message$1 as Message, MistralStream, ObjectStreamPart, ObjectStreamPartInput, OpenAIStream, OpenAIStreamCallbacks, ReactResponseRow, ReplicateStream, RequestOptions, StreamData, StreamObjectResult, StreamPart, StreamString, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, Tool, ToolCall, ToolCallHandler, ToolCallPart, ToolCallPayload, ToolChoice, ToolContent, ToolInvocation, ToolResultPart, UseChatOptions, UseCompletionOptions, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, createCallbacksTransformer, createChunkDecoder, createEventStreamTransformer, createStreamDataTransformer, experimental_AssistantResponse, experimental_StreamData, experimental_StreamingReactResponse, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, formatStreamPart, generateId, generateObject, generateText, isStreamStringEqualToType, generateId as nanoid, parseStreamPart, readDataStream, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
|
2219
|
+
export { AIStream, AIStreamCallbacksAndOptions, AIStreamParser, AIStreamParserOptions, AWSBedrockAnthropicMessagesStream, AWSBedrockAnthropicStream, AWSBedrockCohereStream, AWSBedrockLlama2Stream, AWSBedrockStream, AnthropicStream, AssistantContent, AssistantMessage, AssistantResponse, AssistantStatus, CallWarning, ChatRequest, ChatRequestOptions, CohereStream, CompletionUsage, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreTool, CoreToolMessage, CoreUserMessage, CreateMessage, DataContent, DataMessage, DeepPartial, EmbedResult, Embedding, EmbeddingModel, ExperimentalAssistantMessage, ExperimentalMessage, ExperimentalTool, ExperimentalToolMessage, ExperimentalUserMessage, FinishReason, Function, FunctionCall$1 as FunctionCall, FunctionCallHandler, FunctionCallPayload, GenerateObjectResult, GenerateTextResult, GoogleGenerativeAIStream, HuggingFaceStream, IdGenerator, ImagePart, InkeepAIStreamCallbacksAndOptions, InkeepChatResultCallbacks, InkeepOnFinalMetadata, InkeepStream, JSONValue, langchainAdapter as LangChainAdapter, LangChainStream, LanguageModel, LogProbs, Message$1 as Message, MistralStream, ObjectStreamPart, ObjectStreamPartInput, OpenAIStream, OpenAIStreamCallbacks, ReactResponseRow, ReplicateStream, RequestOptions, StreamData, StreamObjectResult, StreamPart, StreamString, StreamTextResult, StreamingTextResponse, TextPart$1 as TextPart, TextStreamPart, Tool, ToolCall, ToolCallHandler, ToolCallPart, ToolCallPayload, ToolChoice, ToolContent, ToolInvocation, ToolResultPart, UseAssistantOptions, UseChatOptions, UseCompletionOptions, UserContent, convertDataContentToBase64String, convertDataContentToUint8Array, convertToCoreMessages, createCallbacksTransformer, createChunkDecoder, createEventStreamTransformer, createStreamDataTransformer, embed, experimental_AssistantResponse, experimental_StreamData, experimental_StreamingReactResponse, experimental_generateObject, experimental_generateText, experimental_streamObject, experimental_streamText, formatStreamPart, generateId, generateObject, generateText, isStreamStringEqualToType, generateId as nanoid, parseStreamPart, readDataStream, readableFromAsyncIterable, streamObject, streamText, streamToResponse, tool, trimStartOfStreamHelper };
|