ai 6.0.0-beta.42 → 6.0.0-beta.43
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 +41 -12
- package/dist/index.d.ts +41 -12
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -2295,12 +2295,41 @@ type TextStreamPart<TOOLS extends ToolSet> = {
|
|
|
2295
2295
|
rawValue: unknown;
|
|
2296
2296
|
};
|
|
2297
2297
|
|
|
2298
|
+
/**
|
|
2299
|
+
* An agent is a reusable component that that has tools and that
|
|
2300
|
+
* can generate or stream content.
|
|
2301
|
+
*/
|
|
2302
|
+
interface Agent<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never> {
|
|
2303
|
+
/**
|
|
2304
|
+
* The id of the agent.
|
|
2305
|
+
*/
|
|
2306
|
+
id: string | undefined;
|
|
2307
|
+
/**
|
|
2308
|
+
* The tools that the agent can use.
|
|
2309
|
+
*/
|
|
2310
|
+
tools: TOOLS;
|
|
2311
|
+
/**
|
|
2312
|
+
* Generates an output from the agent (non-streaming).
|
|
2313
|
+
*/
|
|
2314
|
+
generate(options: Prompt): PromiseLike<GenerateTextResult<TOOLS, OUTPUT>>;
|
|
2315
|
+
/**
|
|
2316
|
+
* Streams an output from the agent (streaming).
|
|
2317
|
+
*/
|
|
2318
|
+
stream(options: Prompt): StreamTextResult<TOOLS, OUTPUT_PARTIAL>;
|
|
2319
|
+
/**
|
|
2320
|
+
* Creates a response object that streams UI messages to the client.
|
|
2321
|
+
*/
|
|
2322
|
+
respond(options: {
|
|
2323
|
+
messages: UIMessage<never, never, InferUITools<TOOLS>>[];
|
|
2324
|
+
}): Response;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2298
2327
|
/**
|
|
2299
2328
|
Callback that is set using the `onFinish` option.
|
|
2300
2329
|
|
|
2301
2330
|
@param event - The event that is passed to the callback.
|
|
2302
2331
|
*/
|
|
2303
|
-
type
|
|
2332
|
+
type BasicAgentOnFinishCallback<TOOLS extends ToolSet> = (event: StepResult<TOOLS> & {
|
|
2304
2333
|
/**
|
|
2305
2334
|
Details for all steps.
|
|
2306
2335
|
*/
|
|
@@ -2316,16 +2345,16 @@ Callback that is set using the `onStepFinish` option.
|
|
|
2316
2345
|
|
|
2317
2346
|
@param stepResult - The result of the step.
|
|
2318
2347
|
*/
|
|
2319
|
-
type
|
|
2348
|
+
type BasicAgentOnStepFinishCallback<TOOLS extends ToolSet> = (stepResult: StepResult<TOOLS>) => Promise<void> | void;
|
|
2320
2349
|
|
|
2321
2350
|
/**
|
|
2322
2351
|
* Configuration options for an agent.
|
|
2323
2352
|
*/
|
|
2324
|
-
type
|
|
2353
|
+
type BasicAgentSettings<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never> = CallSettings & {
|
|
2325
2354
|
/**
|
|
2326
|
-
* The
|
|
2355
|
+
* The id of the agent.
|
|
2327
2356
|
*/
|
|
2328
|
-
|
|
2357
|
+
id?: string;
|
|
2329
2358
|
/**
|
|
2330
2359
|
* The system prompt to use.
|
|
2331
2360
|
*/
|
|
@@ -2377,11 +2406,11 @@ type AgentSettings<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never
|
|
|
2377
2406
|
/**
|
|
2378
2407
|
* Callback that is called when each step (LLM call) is finished, including intermediate steps.
|
|
2379
2408
|
*/
|
|
2380
|
-
onStepFinish?:
|
|
2409
|
+
onStepFinish?: BasicAgentOnStepFinishCallback<NoInfer<TOOLS>>;
|
|
2381
2410
|
/**
|
|
2382
2411
|
* Callback that is called when all steps are finished and the response is complete.
|
|
2383
2412
|
*/
|
|
2384
|
-
onFinish?:
|
|
2413
|
+
onFinish?: BasicAgentOnFinishCallback<NoInfer<TOOLS>>;
|
|
2385
2414
|
/**
|
|
2386
2415
|
Additional provider-specific options. They are passed through
|
|
2387
2416
|
to the provider from the AI SDK and enable provider-specific
|
|
@@ -2407,13 +2436,13 @@ type AgentSettings<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never
|
|
|
2407
2436
|
*
|
|
2408
2437
|
* Define agents once and use them across your application.
|
|
2409
2438
|
*/
|
|
2410
|
-
declare class
|
|
2439
|
+
declare class BasicAgent<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never> implements Agent<TOOLS, OUTPUT, OUTPUT_PARTIAL> {
|
|
2411
2440
|
private readonly settings;
|
|
2412
|
-
constructor(settings:
|
|
2441
|
+
constructor(settings: BasicAgentSettings<TOOLS, OUTPUT, OUTPUT_PARTIAL>);
|
|
2413
2442
|
/**
|
|
2414
|
-
* The
|
|
2443
|
+
* The id of the agent.
|
|
2415
2444
|
*/
|
|
2416
|
-
get
|
|
2445
|
+
get id(): string | undefined;
|
|
2417
2446
|
/**
|
|
2418
2447
|
* The tools that the agent can use.
|
|
2419
2448
|
*/
|
|
@@ -4795,4 +4824,4 @@ declare global {
|
|
|
4795
4824
|
var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
|
|
4796
4825
|
}
|
|
4797
4826
|
|
|
4798
|
-
export { AbstractChat, Agent,
|
|
4827
|
+
export { AbstractChat, Agent, AsyncIterableStream, BasicAgent, BasicAgentOnFinishCallback, BasicAgentOnStepFinishCallback, BasicAgentSettings, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, BasicAgent as Experimental_Agent, BasicAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferAgentUIMessage, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolApprovalRequestOutput, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDeepEqualData, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
|
package/dist/index.d.ts
CHANGED
|
@@ -2295,12 +2295,41 @@ type TextStreamPart<TOOLS extends ToolSet> = {
|
|
|
2295
2295
|
rawValue: unknown;
|
|
2296
2296
|
};
|
|
2297
2297
|
|
|
2298
|
+
/**
|
|
2299
|
+
* An agent is a reusable component that that has tools and that
|
|
2300
|
+
* can generate or stream content.
|
|
2301
|
+
*/
|
|
2302
|
+
interface Agent<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never> {
|
|
2303
|
+
/**
|
|
2304
|
+
* The id of the agent.
|
|
2305
|
+
*/
|
|
2306
|
+
id: string | undefined;
|
|
2307
|
+
/**
|
|
2308
|
+
* The tools that the agent can use.
|
|
2309
|
+
*/
|
|
2310
|
+
tools: TOOLS;
|
|
2311
|
+
/**
|
|
2312
|
+
* Generates an output from the agent (non-streaming).
|
|
2313
|
+
*/
|
|
2314
|
+
generate(options: Prompt): PromiseLike<GenerateTextResult<TOOLS, OUTPUT>>;
|
|
2315
|
+
/**
|
|
2316
|
+
* Streams an output from the agent (streaming).
|
|
2317
|
+
*/
|
|
2318
|
+
stream(options: Prompt): StreamTextResult<TOOLS, OUTPUT_PARTIAL>;
|
|
2319
|
+
/**
|
|
2320
|
+
* Creates a response object that streams UI messages to the client.
|
|
2321
|
+
*/
|
|
2322
|
+
respond(options: {
|
|
2323
|
+
messages: UIMessage<never, never, InferUITools<TOOLS>>[];
|
|
2324
|
+
}): Response;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2298
2327
|
/**
|
|
2299
2328
|
Callback that is set using the `onFinish` option.
|
|
2300
2329
|
|
|
2301
2330
|
@param event - The event that is passed to the callback.
|
|
2302
2331
|
*/
|
|
2303
|
-
type
|
|
2332
|
+
type BasicAgentOnFinishCallback<TOOLS extends ToolSet> = (event: StepResult<TOOLS> & {
|
|
2304
2333
|
/**
|
|
2305
2334
|
Details for all steps.
|
|
2306
2335
|
*/
|
|
@@ -2316,16 +2345,16 @@ Callback that is set using the `onStepFinish` option.
|
|
|
2316
2345
|
|
|
2317
2346
|
@param stepResult - The result of the step.
|
|
2318
2347
|
*/
|
|
2319
|
-
type
|
|
2348
|
+
type BasicAgentOnStepFinishCallback<TOOLS extends ToolSet> = (stepResult: StepResult<TOOLS>) => Promise<void> | void;
|
|
2320
2349
|
|
|
2321
2350
|
/**
|
|
2322
2351
|
* Configuration options for an agent.
|
|
2323
2352
|
*/
|
|
2324
|
-
type
|
|
2353
|
+
type BasicAgentSettings<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never> = CallSettings & {
|
|
2325
2354
|
/**
|
|
2326
|
-
* The
|
|
2355
|
+
* The id of the agent.
|
|
2327
2356
|
*/
|
|
2328
|
-
|
|
2357
|
+
id?: string;
|
|
2329
2358
|
/**
|
|
2330
2359
|
* The system prompt to use.
|
|
2331
2360
|
*/
|
|
@@ -2377,11 +2406,11 @@ type AgentSettings<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never
|
|
|
2377
2406
|
/**
|
|
2378
2407
|
* Callback that is called when each step (LLM call) is finished, including intermediate steps.
|
|
2379
2408
|
*/
|
|
2380
|
-
onStepFinish?:
|
|
2409
|
+
onStepFinish?: BasicAgentOnStepFinishCallback<NoInfer<TOOLS>>;
|
|
2381
2410
|
/**
|
|
2382
2411
|
* Callback that is called when all steps are finished and the response is complete.
|
|
2383
2412
|
*/
|
|
2384
|
-
onFinish?:
|
|
2413
|
+
onFinish?: BasicAgentOnFinishCallback<NoInfer<TOOLS>>;
|
|
2385
2414
|
/**
|
|
2386
2415
|
Additional provider-specific options. They are passed through
|
|
2387
2416
|
to the provider from the AI SDK and enable provider-specific
|
|
@@ -2407,13 +2436,13 @@ type AgentSettings<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never
|
|
|
2407
2436
|
*
|
|
2408
2437
|
* Define agents once and use them across your application.
|
|
2409
2438
|
*/
|
|
2410
|
-
declare class
|
|
2439
|
+
declare class BasicAgent<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never> implements Agent<TOOLS, OUTPUT, OUTPUT_PARTIAL> {
|
|
2411
2440
|
private readonly settings;
|
|
2412
|
-
constructor(settings:
|
|
2441
|
+
constructor(settings: BasicAgentSettings<TOOLS, OUTPUT, OUTPUT_PARTIAL>);
|
|
2413
2442
|
/**
|
|
2414
|
-
* The
|
|
2443
|
+
* The id of the agent.
|
|
2415
2444
|
*/
|
|
2416
|
-
get
|
|
2445
|
+
get id(): string | undefined;
|
|
2417
2446
|
/**
|
|
2418
2447
|
* The tools that the agent can use.
|
|
2419
2448
|
*/
|
|
@@ -4795,4 +4824,4 @@ declare global {
|
|
|
4795
4824
|
var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
|
|
4796
4825
|
}
|
|
4797
4826
|
|
|
4798
|
-
export { AbstractChat, Agent,
|
|
4827
|
+
export { AbstractChat, Agent, AsyncIterableStream, BasicAgent, BasicAgentOnFinishCallback, BasicAgentOnStepFinishCallback, BasicAgentSettings, CallSettings, CallWarning, ChatAddToolApproveResponseFunction, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, BasicAgent as Experimental_Agent, BasicAgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnFinishCallback, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferAgentUIMessage, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolOutputDenied, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolApprovalRequestOutput, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolOutputDenied, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDeepEqualData, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, uiMessageChunkSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
|
package/dist/index.js
CHANGED
|
@@ -23,11 +23,11 @@ __export(src_exports, {
|
|
|
23
23
|
AISDKError: () => import_provider18.AISDKError,
|
|
24
24
|
APICallError: () => import_provider18.APICallError,
|
|
25
25
|
AbstractChat: () => AbstractChat,
|
|
26
|
-
|
|
26
|
+
BasicAgent: () => BasicAgent,
|
|
27
27
|
DefaultChatTransport: () => DefaultChatTransport,
|
|
28
28
|
DownloadError: () => DownloadError,
|
|
29
29
|
EmptyResponseBodyError: () => import_provider18.EmptyResponseBodyError,
|
|
30
|
-
Experimental_Agent: () =>
|
|
30
|
+
Experimental_Agent: () => BasicAgent,
|
|
31
31
|
HttpChatTransport: () => HttpChatTransport,
|
|
32
32
|
InvalidArgumentError: () => InvalidArgumentError,
|
|
33
33
|
InvalidDataContentError: () => InvalidDataContentError,
|
|
@@ -813,7 +813,7 @@ function detectMediaType({
|
|
|
813
813
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
814
814
|
|
|
815
815
|
// src/version.ts
|
|
816
|
-
var VERSION = true ? "6.0.0-beta.
|
|
816
|
+
var VERSION = true ? "6.0.0-beta.43" : "0.0.0-test";
|
|
817
817
|
|
|
818
818
|
// src/util/download/download.ts
|
|
819
819
|
var download = async ({ url }) => {
|
|
@@ -6376,16 +6376,16 @@ function convertToModelMessages(messages, options) {
|
|
|
6376
6376
|
}
|
|
6377
6377
|
var convertToCoreMessages = convertToModelMessages;
|
|
6378
6378
|
|
|
6379
|
-
// src/agent/agent.ts
|
|
6380
|
-
var
|
|
6379
|
+
// src/agent/basic-agent.ts
|
|
6380
|
+
var BasicAgent = class {
|
|
6381
6381
|
constructor(settings) {
|
|
6382
6382
|
this.settings = settings;
|
|
6383
6383
|
}
|
|
6384
6384
|
/**
|
|
6385
|
-
* The
|
|
6385
|
+
* The id of the agent.
|
|
6386
6386
|
*/
|
|
6387
|
-
get
|
|
6388
|
-
return this.settings.
|
|
6387
|
+
get id() {
|
|
6388
|
+
return this.settings.id;
|
|
6389
6389
|
}
|
|
6390
6390
|
/**
|
|
6391
6391
|
* The tools that the agent can use.
|
|
@@ -10907,7 +10907,7 @@ function readUIMessageStream({
|
|
|
10907
10907
|
AISDKError,
|
|
10908
10908
|
APICallError,
|
|
10909
10909
|
AbstractChat,
|
|
10910
|
-
|
|
10910
|
+
BasicAgent,
|
|
10911
10911
|
DefaultChatTransport,
|
|
10912
10912
|
DownloadError,
|
|
10913
10913
|
EmptyResponseBodyError,
|