ai 7.0.123 → 7.0.126
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 +26 -0
- package/dist/index.d.ts +232 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +415 -100
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +199 -8
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +9 -3
- package/dist/internal/index.js.map +1 -1
- package/docs/03-ai-sdk-core/16-mcp-tools.mdx +25 -0
- package/docs/03-ai-sdk-core/36-transcription.mdx +38 -1
- package/docs/03-ai-sdk-core/37-speech.mdx +23 -0
- package/docs/03-ai-sdk-core/60-telemetry.mdx +49 -1
- package/docs/07-reference/01-ai-sdk-core/11-stream-transcribe.mdx +7 -0
- package/docs/07-reference/01-ai-sdk-core/11-transcribe.mdx +7 -0
- package/docs/07-reference/01-ai-sdk-core/12-generate-speech.mdx +7 -0
- package/docs/07-reference/01-ai-sdk-core/17-create-agent-ui-stream.mdx +7 -0
- package/docs/07-reference/01-ai-sdk-core/18-create-agent-ui-stream-response.mdx +7 -0
- package/docs/07-reference/01-ai-sdk-core/18-pipe-agent-ui-stream-to-response.mdx +7 -0
- package/docs/07-reference/04-ai-sdk-workflow/01-workflow-agent.mdx +60 -3
- package/package.json +12 -12
- package/src/agent/create-agent-ui-stream-response.ts +16 -4
- package/src/agent/create-agent-ui-stream.ts +16 -2
- package/src/agent/pipe-agent-ui-stream-to-response.ts +16 -4
- package/src/generate-speech/generate-speech.ts +163 -38
- package/src/generate-speech/index.ts +4 -0
- package/src/generate-speech/speech-events.ts +91 -0
- package/src/telemetry/create-telemetry-dispatcher.ts +18 -5
- package/src/telemetry/telemetry.ts +38 -6
- package/src/telemetry/tracing-channel.ts +3 -0
- package/src/transcribe/index.ts +6 -0
- package/src/transcribe/stream-transcribe.ts +182 -31
- package/src/transcribe/transcribe.ts +186 -33
- package/src/transcribe/transcription-events.ts +111 -0
- package/src/ui/chat.ts +36 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.126
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4f3d236: fix: clear tool approvals when `addToolOutput` runs
|
|
8
|
+
|
|
9
|
+
## 7.0.125
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ff3dcef: feat(ai): add `convertDataPart` to agent UI stream helpers
|
|
14
|
+
|
|
15
|
+
## 7.0.124
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 8c65988: feat(ai): add telemetry to speech generation and transcription, including
|
|
20
|
+
provider usage propagation and experimental streaming lifecycle callbacks
|
|
21
|
+
- Updated dependencies [8c65988]
|
|
22
|
+
- Updated dependencies [e25994e]
|
|
23
|
+
- Updated dependencies [527a163]
|
|
24
|
+
- Updated dependencies [e74afc5]
|
|
25
|
+
- @ai-sdk/provider@4.0.21
|
|
26
|
+
- @ai-sdk/provider-utils@5.0.53
|
|
27
|
+
- @ai-sdk/gateway@4.0.102
|
|
28
|
+
|
|
3
29
|
## 7.0.123
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -4488,9 +4488,153 @@ type RerankingModelCallEndEvent = {
|
|
|
4488
4488
|
}>;
|
|
4489
4489
|
};
|
|
4490
4490
|
//#endregion
|
|
4491
|
+
//#region src/generate-speech/speech-events.d.ts
|
|
4492
|
+
/**
|
|
4493
|
+
* Event passed to telemetry integrations when speech generation begins.
|
|
4494
|
+
*/
|
|
4495
|
+
type GenerateSpeechStartEvent = {
|
|
4496
|
+
/** Unique identifier for this speech generation call. */
|
|
4497
|
+
readonly callId: string;
|
|
4498
|
+
/** Identifies the operation type (`ai.generateSpeech`). */
|
|
4499
|
+
readonly operationId: 'ai.generateSpeech';
|
|
4500
|
+
/** The provider identifier. */
|
|
4501
|
+
readonly provider: string;
|
|
4502
|
+
/** The specific model identifier. */
|
|
4503
|
+
readonly modelId: string;
|
|
4504
|
+
/** The text to convert to speech. */
|
|
4505
|
+
readonly text: string;
|
|
4506
|
+
/** The requested voice. */
|
|
4507
|
+
readonly voice: string | undefined;
|
|
4508
|
+
/** The requested output format. */
|
|
4509
|
+
readonly outputFormat: string | undefined;
|
|
4510
|
+
/** Additional speech instructions. */
|
|
4511
|
+
readonly instructions: string | undefined;
|
|
4512
|
+
/** The requested speech speed. */
|
|
4513
|
+
readonly speed: number | undefined;
|
|
4514
|
+
/** The requested language. */
|
|
4515
|
+
readonly language: string | undefined;
|
|
4516
|
+
/** Maximum number of retries for failed requests. */
|
|
4517
|
+
readonly maxRetries: number;
|
|
4518
|
+
/** Additional HTTP headers sent with the request. */
|
|
4519
|
+
readonly headers: Record<string, string> | undefined;
|
|
4520
|
+
/** Additional provider-specific options. */
|
|
4521
|
+
readonly providerOptions: ProviderOptions;
|
|
4522
|
+
};
|
|
4523
|
+
/**
|
|
4524
|
+
* Event passed to telemetry integrations when speech generation completes.
|
|
4525
|
+
*
|
|
4526
|
+
* Raw audio is intentionally not included. Integrations receive only its size,
|
|
4527
|
+
* media type, and format.
|
|
4528
|
+
*/
|
|
4529
|
+
type GenerateSpeechEndEvent = {
|
|
4530
|
+
/** Unique identifier for this speech generation call. */
|
|
4531
|
+
readonly callId: string;
|
|
4532
|
+
/** Identifies the operation type (`ai.generateSpeech`). */
|
|
4533
|
+
readonly operationId: 'ai.generateSpeech';
|
|
4534
|
+
/** The provider identifier. */
|
|
4535
|
+
readonly provider: string;
|
|
4536
|
+
/** The specific model identifier. */
|
|
4537
|
+
readonly modelId: string;
|
|
4538
|
+
/** The text that was converted to speech. */
|
|
4539
|
+
readonly text: string;
|
|
4540
|
+
/** Metadata about the generated audio. */
|
|
4541
|
+
readonly audio: {
|
|
4542
|
+
readonly byteLength: number;
|
|
4543
|
+
readonly mediaType: string;
|
|
4544
|
+
readonly format: string;
|
|
4545
|
+
};
|
|
4546
|
+
/** Usage reported by the provider, when available. */
|
|
4547
|
+
readonly usage: JSONObject | undefined;
|
|
4548
|
+
/** Warnings from the speech model. */
|
|
4549
|
+
readonly warnings: Array<Warning>;
|
|
4550
|
+
/** Optional provider-specific metadata. */
|
|
4551
|
+
readonly providerMetadata: ProviderMetadata | undefined;
|
|
4552
|
+
/** Response metadata from the provider. */
|
|
4553
|
+
readonly response: SpeechModelResponseMetadata;
|
|
4554
|
+
};
|
|
4555
|
+
//#endregion
|
|
4556
|
+
//#region src/transcribe/transcription-events.d.ts
|
|
4557
|
+
/**
|
|
4558
|
+
* Event passed to telemetry integrations when transcription begins.
|
|
4559
|
+
*/
|
|
4560
|
+
type TranscriptionStartEventFor<OPERATION_ID extends string> = {
|
|
4561
|
+
/** Unique identifier for this transcription call. */
|
|
4562
|
+
readonly callId: string;
|
|
4563
|
+
/** Identifies the operation type (`ai.transcribe` or `ai.streamTranscribe`). */
|
|
4564
|
+
readonly operationId: OPERATION_ID;
|
|
4565
|
+
/** The provider identifier. */
|
|
4566
|
+
readonly provider: string;
|
|
4567
|
+
/** The specific model identifier. */
|
|
4568
|
+
readonly modelId: string;
|
|
4569
|
+
/**
|
|
4570
|
+
* Metadata about the input audio. The byte length is known immediately for
|
|
4571
|
+
* non-streaming transcription and is reported on the end event for streams.
|
|
4572
|
+
*/
|
|
4573
|
+
readonly audio: {
|
|
4574
|
+
readonly byteLength: number | undefined;
|
|
4575
|
+
/**
|
|
4576
|
+
* The media type, when it is known before input preparation completes.
|
|
4577
|
+
* URL downloads and invalid inline inputs can begin without this metadata.
|
|
4578
|
+
*/
|
|
4579
|
+
readonly mediaType: string | undefined;
|
|
4580
|
+
};
|
|
4581
|
+
/** The raw input format for streaming transcription. */
|
|
4582
|
+
readonly inputAudioFormat: SharedV4AudioFormat | undefined;
|
|
4583
|
+
/** Maximum number of retries for non-streaming transcription. */
|
|
4584
|
+
readonly maxRetries: number | undefined;
|
|
4585
|
+
/** Additional HTTP or WebSocket headers sent with the request. */
|
|
4586
|
+
readonly headers: Record<string, string> | undefined;
|
|
4587
|
+
/** Additional provider-specific options. */
|
|
4588
|
+
readonly providerOptions: ProviderOptions;
|
|
4589
|
+
};
|
|
4590
|
+
type TranscriptionStartEvent = TranscriptionStartEventFor<'ai.transcribe'>;
|
|
4591
|
+
type StreamTranscriptionStartEvent = TranscriptionStartEventFor<'ai.streamTranscribe'>;
|
|
4592
|
+
/**
|
|
4593
|
+
* Event passed to telemetry integrations when transcription completes.
|
|
4594
|
+
*
|
|
4595
|
+
* Raw audio is intentionally not included.
|
|
4596
|
+
*/
|
|
4597
|
+
type TranscriptionEndEventFor<OPERATION_ID extends string> = {
|
|
4598
|
+
/** Unique identifier for this transcription call. */
|
|
4599
|
+
readonly callId: string;
|
|
4600
|
+
/** Identifies the operation type (`ai.transcribe` or `ai.streamTranscribe`). */
|
|
4601
|
+
readonly operationId: OPERATION_ID;
|
|
4602
|
+
/** The provider identifier. */
|
|
4603
|
+
readonly provider: string;
|
|
4604
|
+
/** The specific model identifier. */
|
|
4605
|
+
readonly modelId: string;
|
|
4606
|
+
/** Metadata about the input audio. */
|
|
4607
|
+
readonly audio: {
|
|
4608
|
+
readonly byteLength: number;
|
|
4609
|
+
readonly mediaType: string;
|
|
4610
|
+
};
|
|
4611
|
+
/** The complete transcript. */
|
|
4612
|
+
readonly text: string;
|
|
4613
|
+
/** Transcript segments with timing information. */
|
|
4614
|
+
readonly segments: Array<{
|
|
4615
|
+
readonly text: string;
|
|
4616
|
+
readonly startSecond: number;
|
|
4617
|
+
readonly endSecond: number;
|
|
4618
|
+
}>;
|
|
4619
|
+
/** The detected language. */
|
|
4620
|
+
readonly language: string | undefined;
|
|
4621
|
+
/** The duration of the input audio, when available. */
|
|
4622
|
+
readonly durationInSeconds: number | undefined;
|
|
4623
|
+
/** Usage reported by the provider, when available. */
|
|
4624
|
+
readonly usage: JSONObject | undefined;
|
|
4625
|
+
/** Warnings from the transcription model. */
|
|
4626
|
+
readonly warnings: Array<Warning>;
|
|
4627
|
+
/** Optional provider-specific metadata. */
|
|
4628
|
+
readonly providerMetadata: ProviderMetadata | undefined;
|
|
4629
|
+
/** Response metadata from the provider. */
|
|
4630
|
+
readonly response: TranscriptionModelResponseMetadata;
|
|
4631
|
+
};
|
|
4632
|
+
type TranscriptionEndEvent = TranscriptionEndEventFor<'ai.transcribe'>;
|
|
4633
|
+
type StreamTranscriptionEndEvent = TranscriptionEndEventFor<'ai.streamTranscribe'>;
|
|
4634
|
+
//#endregion
|
|
4491
4635
|
//#region src/telemetry/tracing-channel.d.ts
|
|
4492
4636
|
export declare const AI_SDK_TELEMETRY_TRACING_CHANNEL = "ai:telemetry";
|
|
4493
|
-
type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank' | 'experimental_evaluate';
|
|
4637
|
+
type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank' | 'generateSpeech' | 'transcribe' | 'streamTranscribe' | 'experimental_evaluate';
|
|
4494
4638
|
type TelemetryTracingChannelMessage<EVENT = unknown> = {
|
|
4495
4639
|
readonly type: TelemetryTracingEventType;
|
|
4496
4640
|
readonly event: EVENT;
|
|
@@ -4498,8 +4642,11 @@ type TelemetryTracingChannelMessage<EVENT = unknown> = {
|
|
|
4498
4642
|
//#endregion
|
|
4499
4643
|
//#region src/telemetry/telemetry.d.ts
|
|
4500
4644
|
type InferTelemetryEvent<EVENT> = EVENT & Omit<TelemetryOptions, 'integrations' | 'isEnabled' | 'includeRuntimeContext'>;
|
|
4501
|
-
type
|
|
4502
|
-
|
|
4645
|
+
type BivariantCallback<EVENT> = {
|
|
4646
|
+
bivarianceHack(event: EVENT): PromiseLike<void> | void;
|
|
4647
|
+
}['bivarianceHack'];
|
|
4648
|
+
type OperationStartEvent = GenerateTextStartEvent | GenerateObjectStartEvent | EmbedStartEvent | RerankStartEvent | GenerateSpeechStartEvent | TranscriptionStartEvent;
|
|
4649
|
+
type OperationEndEvent = GenerateTextEndEvent<ToolSet$1> | GenerateObjectEndEvent<unknown> | EmbedEndEvent | RerankEndEvent | GenerateSpeechEndEvent | TranscriptionEndEvent;
|
|
4503
4650
|
/**
|
|
4504
4651
|
* Implement this interface to create custom telemetry integrations.
|
|
4505
4652
|
* Methods can be sync or return a PromiseLike.
|
|
@@ -4508,11 +4655,12 @@ interface Telemetry {
|
|
|
4508
4655
|
/**
|
|
4509
4656
|
* Called when an operation begins. Fired for text generation
|
|
4510
4657
|
* (generateText/streamText), object generation (generateObject/streamObject),
|
|
4511
|
-
* embedding (embed/embedMany),
|
|
4658
|
+
* embedding (embed/embedMany), reranking, speech generation, and
|
|
4659
|
+
* non-streaming transcription operations.
|
|
4512
4660
|
*
|
|
4513
4661
|
* Use the `operationId` field to distinguish between operation types.
|
|
4514
4662
|
*/
|
|
4515
|
-
onStart?:
|
|
4663
|
+
onStart?: BivariantCallback<InferTelemetryEvent<OperationStartEvent>>;
|
|
4516
4664
|
/**
|
|
4517
4665
|
* Called when an individual step (single LLM invocation) begins.
|
|
4518
4666
|
* A generation may consist of multiple steps (e.g. when tool calls trigger
|
|
@@ -4609,14 +4757,19 @@ interface Telemetry {
|
|
|
4609
4757
|
experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<EvaluationModelCallEndEvent>>;
|
|
4610
4758
|
/** Called when an experimental evaluation operation completes. */
|
|
4611
4759
|
experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<EvaluateEndEvent>>;
|
|
4760
|
+
/** Called when an experimental streaming transcription operation begins. */
|
|
4761
|
+
experimental_onStreamTranscriptionStart?: Callback<InferTelemetryEvent<StreamTranscriptionStartEvent>>;
|
|
4762
|
+
/** Called when an experimental streaming transcription operation completes. */
|
|
4763
|
+
experimental_onStreamTranscriptionEnd?: Callback<InferTelemetryEvent<StreamTranscriptionEndEvent>>;
|
|
4612
4764
|
/**
|
|
4613
4765
|
* Called when an operation completes. Fired for text generation
|
|
4614
4766
|
* (generateText/streamText), object generation (generateObject/streamObject),
|
|
4615
|
-
* embedding (embed/embedMany),
|
|
4767
|
+
* embedding (embed/embedMany), reranking, speech generation, and
|
|
4768
|
+
* non-streaming transcription operations.
|
|
4616
4769
|
*
|
|
4617
4770
|
* Use the event shape or `operationId` to distinguish between operation types.
|
|
4618
4771
|
*/
|
|
4619
|
-
onEnd?:
|
|
4772
|
+
onEnd?: BivariantCallback<InferTelemetryEvent<OperationEndEvent>>;
|
|
4620
4773
|
/**
|
|
4621
4774
|
* Called when a streaming text generation operation is aborted before it
|
|
4622
4775
|
* completes.
|
|
@@ -5548,12 +5701,31 @@ type InferAgentTools<AGENT> = AGENT extends Agent<any, infer TOOLS, any> ? TOOLS
|
|
|
5548
5701
|
*/
|
|
5549
5702
|
type InferAgentUIMessage<AGENT, MESSAGE_METADATA = unknown> = UIMessage<MESSAGE_METADATA, never, InferUITools<InferAgentTools<AGENT>>>;
|
|
5550
5703
|
//#endregion
|
|
5704
|
+
//#region src/ui/convert-to-model-messages.d.ts
|
|
5705
|
+
/**
|
|
5706
|
+
* Converts an array of UI messages from useChat into an array of ModelMessages that can be used
|
|
5707
|
+
* with the AI functions (e.g. `streamText`, `generateText`).
|
|
5708
|
+
*
|
|
5709
|
+
* @param messages - The UI messages to convert.
|
|
5710
|
+
* @param options.tools - The tools to use.
|
|
5711
|
+
* @param options.ignoreIncompleteToolCalls - Whether to ignore incomplete tool calls. Default is `false`.
|
|
5712
|
+
* @param options.convertDataPart - Optional function to convert data parts to text or file model message parts. Returns `undefined` if the part should be ignored.
|
|
5713
|
+
*
|
|
5714
|
+
* @returns An array of ModelMessages.
|
|
5715
|
+
*/
|
|
5716
|
+
export declare function convertToModelMessages<UI_MESSAGE extends UIMessage>(messages: Array<Omit<UI_MESSAGE, 'id'>>, options?: {
|
|
5717
|
+
tools?: ToolSet$1;
|
|
5718
|
+
ignoreIncompleteToolCalls?: boolean;
|
|
5719
|
+
convertDataPart?: (part: DataUIPart<InferUIMessageData<UI_MESSAGE>>) => TextPart$1 | FilePart$1 | undefined;
|
|
5720
|
+
}): Promise<ModelMessage$1[]>;
|
|
5721
|
+
//#endregion
|
|
5551
5722
|
//#region src/agent/create-agent-ui-stream-response.d.ts
|
|
5552
5723
|
/**
|
|
5553
5724
|
* Runs the agent and returns a response object with a UI message stream.
|
|
5554
5725
|
*
|
|
5555
5726
|
* @param agent - The agent to run.
|
|
5556
5727
|
* @param uiMessages - The input UI messages.
|
|
5728
|
+
* @param convertDataPart - Optional function to convert custom data parts to text or file model message parts.
|
|
5557
5729
|
* @param abortSignal - Abort signal. Optional.
|
|
5558
5730
|
* @param timeout - Timeout in milliseconds. Optional.
|
|
5559
5731
|
* @param experimental_sandbox - The sandbox environment that is passed through to tool execution. Optional.
|
|
@@ -5569,9 +5741,14 @@ type InferAgentUIMessage<AGENT, MESSAGE_METADATA = unknown> = UIMessage<MESSAGE_
|
|
|
5569
5741
|
*
|
|
5570
5742
|
* @returns The response object.
|
|
5571
5743
|
*/
|
|
5572
|
-
export declare function createAgentUIStreamResponse<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown
|
|
5744
|
+
export declare function createAgentUIStreamResponse<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ headers, status, statusText, keepAliveMs, consumeSseStream, ...options }: {
|
|
5573
5745
|
agent: Agent<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, OUTPUT>;
|
|
5574
5746
|
uiMessages: unknown[];
|
|
5747
|
+
/**
|
|
5748
|
+
* Converts custom UI data parts to text or file model message parts.
|
|
5749
|
+
* Data parts are ignored when omitted or when the callback returns undefined.
|
|
5750
|
+
*/
|
|
5751
|
+
convertDataPart?: NonNullable<Parameters<typeof convertToModelMessages<UI_MESSAGE>>[1]>['convertDataPart'];
|
|
5575
5752
|
abortSignal?: AbortSignal;
|
|
5576
5753
|
timeout?: TimeoutConfiguration<TOOLS>;
|
|
5577
5754
|
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
@@ -5580,7 +5757,7 @@ export declare function createAgentUIStreamResponse<CALL_OPTIONS = never, TOOLS
|
|
|
5580
5757
|
onStepEnd?: GenerateTextOnStepEndCallback<TOOLS>;
|
|
5581
5758
|
/** @deprecated Use `onStepEnd` instead. */
|
|
5582
5759
|
onStepFinish?: GenerateTextOnStepFinishCallback<TOOLS>;
|
|
5583
|
-
} & UIMessageStreamResponseInit & UIMessageStreamOptions<
|
|
5760
|
+
} & UIMessageStreamResponseInit & UIMessageStreamOptions<UI_MESSAGE>): Promise<Response>;
|
|
5584
5761
|
//#endregion
|
|
5585
5762
|
//#region src/ui-message-stream/ui-message-stream-on-step-end-callback.d.ts
|
|
5586
5763
|
/**
|
|
@@ -5943,24 +6120,6 @@ export declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
5943
6120
|
//#region src/ui/convert-file-list-to-file-ui-parts.d.ts
|
|
5944
6121
|
export declare function convertFileListToFileUIParts(files: FileList | undefined): Promise<Array<FileUIPart>>;
|
|
5945
6122
|
//#endregion
|
|
5946
|
-
//#region src/ui/convert-to-model-messages.d.ts
|
|
5947
|
-
/**
|
|
5948
|
-
* Converts an array of UI messages from useChat into an array of ModelMessages that can be used
|
|
5949
|
-
* with the AI functions (e.g. `streamText`, `generateText`).
|
|
5950
|
-
*
|
|
5951
|
-
* @param messages - The UI messages to convert.
|
|
5952
|
-
* @param options.tools - The tools to use.
|
|
5953
|
-
* @param options.ignoreIncompleteToolCalls - Whether to ignore incomplete tool calls. Default is `false`.
|
|
5954
|
-
* @param options.convertDataPart - Optional function to convert data parts to text or file model message parts. Returns `undefined` if the part should be ignored.
|
|
5955
|
-
*
|
|
5956
|
-
* @returns An array of ModelMessages.
|
|
5957
|
-
*/
|
|
5958
|
-
export declare function convertToModelMessages<UI_MESSAGE extends UIMessage>(messages: Array<Omit<UI_MESSAGE, 'id'>>, options?: {
|
|
5959
|
-
tools?: ToolSet$1;
|
|
5960
|
-
ignoreIncompleteToolCalls?: boolean;
|
|
5961
|
-
convertDataPart?: (part: DataUIPart<InferUIMessageData<UI_MESSAGE>>) => TextPart$1 | FilePart$1 | undefined;
|
|
5962
|
-
}): Promise<ModelMessage$1[]>;
|
|
5963
|
-
//#endregion
|
|
5964
6123
|
//#region src/ui/http-chat-transport.d.ts
|
|
5965
6124
|
type PrepareSendMessagesRequest<UI_MESSAGE extends UIMessage> = (options: {
|
|
5966
6125
|
id: string;
|
|
@@ -6449,6 +6608,7 @@ type UIMessageStreamOnFinishCallback<UI_MESSAGE extends UIMessage> = UIMessageSt
|
|
|
6449
6608
|
*
|
|
6450
6609
|
* @param agent - The agent to run.
|
|
6451
6610
|
* @param uiMessages - The input UI messages.
|
|
6611
|
+
* @param convertDataPart - Optional function to convert custom data parts to text or file model message parts.
|
|
6452
6612
|
* @param abortSignal - The abort signal. Optional.
|
|
6453
6613
|
* @param timeout - Timeout in milliseconds. Optional.
|
|
6454
6614
|
* @param experimental_sandbox - The sandbox environment that is passed through to tool execution. Optional.
|
|
@@ -6459,9 +6619,14 @@ type UIMessageStreamOnFinishCallback<UI_MESSAGE extends UIMessage> = UIMessageSt
|
|
|
6459
6619
|
*
|
|
6460
6620
|
* @returns The UI message stream.
|
|
6461
6621
|
*/
|
|
6462
|
-
export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA,
|
|
6622
|
+
export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ agent, uiMessages, convertDataPart, options, abortSignal, timeout, experimental_sandbox: sandbox, experimental_transform, onStepEnd, onStepFinish, ...uiMessageStreamOptions }: {
|
|
6463
6623
|
agent: Agent<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, OUTPUT>;
|
|
6464
6624
|
uiMessages: unknown[];
|
|
6625
|
+
/**
|
|
6626
|
+
* Converts custom UI data parts to text or file model message parts.
|
|
6627
|
+
* Data parts are ignored when omitted or when the callback returns undefined.
|
|
6628
|
+
*/
|
|
6629
|
+
convertDataPart?: NonNullable<Parameters<typeof convertToModelMessages<UI_MESSAGE>>[1]>['convertDataPart'];
|
|
6465
6630
|
abortSignal?: AbortSignal;
|
|
6466
6631
|
timeout?: TimeoutConfiguration<TOOLS>;
|
|
6467
6632
|
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
@@ -6479,6 +6644,7 @@ export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends
|
|
|
6479
6644
|
* @param response - The Node.js ServerResponse object to pipe to.
|
|
6480
6645
|
* @param agent - The agent to run.
|
|
6481
6646
|
* @param uiMessages - The input UI messages.
|
|
6647
|
+
* @param convertDataPart - Optional function to convert custom data parts to text or file model message parts.
|
|
6482
6648
|
* @param abortSignal - Abort signal. Optional.
|
|
6483
6649
|
* @param timeout - Timeout in milliseconds. Optional.
|
|
6484
6650
|
* @param experimental_sandbox - The sandbox environment that is passed through to tool execution. Optional.
|
|
@@ -6492,10 +6658,15 @@ export declare function createAgentUIStream<CALL_OPTIONS = never, TOOLS extends
|
|
|
6492
6658
|
* @param keepAliveMs - Optional interval for sending SSE keep-alive comments.
|
|
6493
6659
|
* @param consumeSseStream - Whether to consume the SSE stream. Optional.
|
|
6494
6660
|
*/
|
|
6495
|
-
export declare function pipeAgentUIStreamToResponse<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown
|
|
6661
|
+
export declare function pipeAgentUIStreamToResponse<CALL_OPTIONS = never, TOOLS extends ToolSet$1 = {}, RUNTIME_CONTEXT extends Context = Context, OUTPUT extends Output = never, MESSAGE_METADATA = unknown, UI_MESSAGE extends UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>> = UIMessage<MESSAGE_METADATA, UIDataTypes, InferUITools<TOOLS>>>({ response, headers, status, statusText, keepAliveMs, consumeSseStream, ...options }: {
|
|
6496
6662
|
response: ServerResponse;
|
|
6497
6663
|
agent: Agent<CALL_OPTIONS, TOOLS, RUNTIME_CONTEXT, OUTPUT>;
|
|
6498
6664
|
uiMessages: unknown[];
|
|
6665
|
+
/**
|
|
6666
|
+
* Converts custom UI data parts to text or file model message parts.
|
|
6667
|
+
* Data parts are ignored when omitted or when the callback returns undefined.
|
|
6668
|
+
*/
|
|
6669
|
+
convertDataPart?: NonNullable<Parameters<typeof convertToModelMessages<UI_MESSAGE>>[1]>['convertDataPart'];
|
|
6499
6670
|
abortSignal?: AbortSignal;
|
|
6500
6671
|
timeout?: TimeoutConfiguration<TOOLS>;
|
|
6501
6672
|
experimental_sandbox?: Experimental_SandboxSession$1;
|
|
@@ -6504,7 +6675,7 @@ export declare function pipeAgentUIStreamToResponse<CALL_OPTIONS = never, TOOLS
|
|
|
6504
6675
|
onStepEnd?: GenerateTextOnStepEndCallback<TOOLS>;
|
|
6505
6676
|
/** @deprecated Use `onStepEnd` instead. */
|
|
6506
6677
|
onStepFinish?: GenerateTextOnStepFinishCallback<TOOLS>;
|
|
6507
|
-
} & UIMessageStreamResponseInit & UIMessageStreamOptions<
|
|
6678
|
+
} & UIMessageStreamResponseInit & UIMessageStreamOptions<UI_MESSAGE>): Promise<void>;
|
|
6508
6679
|
//#endregion
|
|
6509
6680
|
//#region src/generate-text/filter-active-tools.d.ts
|
|
6510
6681
|
type ActiveToolSubset<TOOLS extends ToolSet$1 | undefined, ACTIVE_TOOL_NAMES extends ActiveTools<NonNullable<TOOLS>>> = TOOLS extends undefined ? undefined : [ACTIVE_TOOL_NAMES] extends [NonNullable<ActiveTools<NonNullable<TOOLS>>>] ? Pick<NonNullable<TOOLS>, ACTIVE_TOOL_NAMES[number]> : TOOLS;
|
|
@@ -8638,10 +8809,11 @@ interface SpeechResult {
|
|
|
8638
8809
|
* @param maxRetries - Maximum number of retries. Set to 0 to disable retries. Default: 2.
|
|
8639
8810
|
* @param abortSignal - An optional abort signal that can be used to cancel the call.
|
|
8640
8811
|
* @param headers - Additional HTTP headers to be sent with the request. Only applicable for HTTP-based providers.
|
|
8812
|
+
* @param telemetry - Optional telemetry configuration.
|
|
8641
8813
|
*
|
|
8642
8814
|
* @returns A result object that contains the generated audio data.
|
|
8643
8815
|
*/
|
|
8644
|
-
export declare function generateSpeech({ model, text, voice, outputFormat, instructions, speed, language, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers }: {
|
|
8816
|
+
export declare function generateSpeech({ model, text, voice, outputFormat, instructions, speed, language, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, telemetry, _internal: { generateCallId } }: {
|
|
8645
8817
|
/**
|
|
8646
8818
|
* The speech model to use.
|
|
8647
8819
|
*/
|
|
@@ -8699,6 +8871,16 @@ export declare function generateSpeech({ model, text, voice, outputFormat, instr
|
|
|
8699
8871
|
* Only applicable for HTTP-based providers.
|
|
8700
8872
|
*/
|
|
8701
8873
|
headers?: Record<string, string>;
|
|
8874
|
+
/**
|
|
8875
|
+
* Optional telemetry configuration.
|
|
8876
|
+
*/
|
|
8877
|
+
telemetry?: TelemetryOptions;
|
|
8878
|
+
/**
|
|
8879
|
+
* Internal. For test use only. May change without notice.
|
|
8880
|
+
*/
|
|
8881
|
+
_internal?: {
|
|
8882
|
+
generateCallId?: () => string;
|
|
8883
|
+
};
|
|
8702
8884
|
}): Promise<SpeechResult>;
|
|
8703
8885
|
//#endregion
|
|
8704
8886
|
//#region src/generate-speech/index.d.ts
|
|
@@ -9873,7 +10055,7 @@ interface TranscriptionResult {
|
|
|
9873
10055
|
}
|
|
9874
10056
|
//#endregion
|
|
9875
10057
|
//#region src/transcribe/transcribe.d.ts
|
|
9876
|
-
export declare function transcribe({ model, audio, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, download: downloadFn }: {
|
|
10058
|
+
export declare function transcribe({ model, audio, providerOptions, maxRetries: maxRetriesArg, abortSignal, headers, telemetry, download: downloadFn, _internal: { generateCallId } }: {
|
|
9877
10059
|
/**
|
|
9878
10060
|
* The transcription model to use.
|
|
9879
10061
|
*/
|
|
@@ -9912,6 +10094,10 @@ export declare function transcribe({ model, audio, providerOptions, maxRetries:
|
|
|
9912
10094
|
* Only applicable for HTTP-based providers.
|
|
9913
10095
|
*/
|
|
9914
10096
|
headers?: Record<string, string>;
|
|
10097
|
+
/**
|
|
10098
|
+
* Optional telemetry configuration.
|
|
10099
|
+
*/
|
|
10100
|
+
telemetry?: TelemetryOptions;
|
|
9915
10101
|
/**
|
|
9916
10102
|
* Custom download function for fetching audio from URLs.
|
|
9917
10103
|
* Use `createDownload()` from `ai` to create a download function with custom size limits.
|
|
@@ -9925,6 +10111,12 @@ export declare function transcribe({ model, audio, providerOptions, maxRetries:
|
|
|
9925
10111
|
data: Uint8Array;
|
|
9926
10112
|
mediaType: string | undefined;
|
|
9927
10113
|
}>;
|
|
10114
|
+
/**
|
|
10115
|
+
* Internal. For test use only. May change without notice.
|
|
10116
|
+
*/
|
|
10117
|
+
_internal?: {
|
|
10118
|
+
generateCallId?: () => string;
|
|
10119
|
+
};
|
|
9928
10120
|
}): Promise<TranscriptionResult>;
|
|
9929
10121
|
//#endregion
|
|
9930
10122
|
//#region src/transcribe/stream-transcribe-result.d.ts
|
|
@@ -10010,10 +10202,11 @@ interface StreamTranscriptionResult {
|
|
|
10010
10202
|
* @param providerOptions - Additional provider-specific options.
|
|
10011
10203
|
* @param abortSignal - An optional abort signal that can be used to cancel the call.
|
|
10012
10204
|
* @param headers - Additional HTTP/WebSocket headers to send when supported by the provider.
|
|
10205
|
+
* @param telemetry - Optional telemetry configuration.
|
|
10013
10206
|
*
|
|
10014
10207
|
* @returns A result object that contains the streaming transcript and final transcript metadata.
|
|
10015
10208
|
*/
|
|
10016
|
-
declare function streamTranscribe({ model, audio, inputAudioFormat, providerOptions, abortSignal, headers, includeRawChunks, _internal: { currentDate } }: {
|
|
10209
|
+
declare function streamTranscribe({ model, audio, inputAudioFormat, providerOptions, abortSignal, headers, includeRawChunks, telemetry, _internal: { currentDate, generateCallId } }: {
|
|
10017
10210
|
/**
|
|
10018
10211
|
* The transcription model to use.
|
|
10019
10212
|
*/
|
|
@@ -10042,11 +10235,16 @@ declare function streamTranscribe({ model, audio, inputAudioFormat, providerOpti
|
|
|
10042
10235
|
* When true, providers should include raw provider chunks in the stream.
|
|
10043
10236
|
*/
|
|
10044
10237
|
includeRawChunks?: boolean;
|
|
10238
|
+
/**
|
|
10239
|
+
* Optional telemetry configuration.
|
|
10240
|
+
*/
|
|
10241
|
+
telemetry?: TelemetryOptions;
|
|
10045
10242
|
/**
|
|
10046
10243
|
* Internal test hooks.
|
|
10047
10244
|
*/
|
|
10048
10245
|
_internal?: {
|
|
10049
10246
|
currentDate?: () => Date;
|
|
10247
|
+
generateCallId?: () => string;
|
|
10050
10248
|
};
|
|
10051
10249
|
}): StreamTranscriptionResult;
|
|
10052
10250
|
//#endregion
|
|
@@ -10343,5 +10541,5 @@ export declare function uploadSkill({ api, files, displayTitle, providerOptions
|
|
|
10343
10541
|
files: UploadSkillFile[];
|
|
10344
10542
|
}): Promise<UploadSkillResult>;
|
|
10345
10543
|
//#endregion
|
|
10346
|
-
export { AISDKError, APICallError, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AssistantContent, type AssistantModelMessage, type AsyncIterableStream, type CallWarning, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataContent, type DataUIPart, type DeepPartial, type DirectChatTransportOptions, DownloadError, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type Embedding, type EmbeddingModel, type EmbeddingModelMiddleware, type EmbeddingModelUsage, EmptyResponseBodyError, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type ToolLoopAgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DownloadFunction as Experimental_DownloadFunction, type EvaluateEndEvent as Experimental_EvaluateEndEvent, type EvaluateStartEvent as Experimental_EvaluateStartEvent, type EvaluationAnswer as Experimental_EvaluationAnswer, type EvaluationModel as Experimental_EvaluationModel, type EvaluationModelCallEndEvent as Experimental_EvaluationModelCallEndEvent, type EvaluationModelCallStartEvent as Experimental_EvaluationModelCallStartEvent, type EvaluationProviderRegistry as Experimental_EvaluationProviderRegistry, type EvaluationQuestion as Experimental_EvaluationQuestion, type EvaluationResult as Experimental_EvaluationResult, Experimental_EvaluationUnsupportedQuestionTypeError, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SandboxProcess, type Experimental_SandboxSession, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallerTool, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FilePart, type FileUIPart, type FinishReason, type FlexibleSchema, type GatewayAsyncJobMetadata, type GatewayModelId, type GatewayProviderMetadata, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, type HttpChatTransportInitOptions, type IdGenerator, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type ImagePart, type InferCompleteOutput as InferGenerateOutput, type InferSchema, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferToolInput, type InferToolOutput, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidPromptError, InvalidResponseDataError, JSONParseError, type JSONSchema7, type JSONValue, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, LoadAPIKeyError, LoadSettingError, type ModelInfo, type ModelMessage, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output_d_exports as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, type SafeValidateUIMessagesResult, type Schema, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type SystemModelMessage, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, type TextPart, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, TooManyEmbeddingValuesForCallError, type Tool, type ToolApprovalConfiguration, type ToolApprovalRequest, type ToolApprovalRequestOutput, type ToolApprovalResponse, type ToolApprovalResponseOutput, type ToolApprovalStatus, type ToolCallPart, type ToolCallRepairFunction, type ToolChoice, type ToolContent, type ToolExecuteFunction, type ToolExecutionEndEvent, type ToolExecutionOptions, type ToolExecutionStartEvent, type ToolInputRefinement, type ToolModelMessage, type ToolOrder, type ToolOutputErrorUIPart, type ToolResultPart, type ToolSet, type ToolUIPart, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStreamPart, TypeValidationError, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UnsupportedFunctionalityError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type UserContent, type UserModelMessage, type Warning, asSchema, createGateway, createIdGenerator, dynamicTool, cancelBatch as experimental_cancelBatch, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, evaluate as experimental_evaluate, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_toolCaller, experimental_transcribe, gateway, generateId$1 as generateId, isStepCount as stepCountIs, jsonSchema, parseJsonEventStream, tool$1 as tool, zodSchema };
|
|
10544
|
+
export { AISDKError, APICallError, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AssistantContent, type AssistantModelMessage, type AsyncIterableStream, type CallWarning, type ChatAddToolApproveResponseFunction, type ChatAddToolOutputFunction, type ChatInit, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatOnToolCallCallback, type ChatRequestOptions, type ChatState, type ChatStatus, type ChatTransport, type ChunkDetector, type CompletionRequestOptions, type ContentPart, type CreateUIMessage, type CustomContentUIPart, type DataContent, type DataUIPart, type DeepPartial, type DirectChatTransportOptions, DownloadError, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type Embedding, type EmbeddingModel, type EmbeddingModelMiddleware, type EmbeddingModelUsage, EmptyResponseBodyError, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, type ToolLoopAgentSettings, type Batch as Experimental_Batch, type BatchError as Experimental_BatchError, type BatchItemResult as Experimental_BatchItemResult, type BatchProvider as Experimental_BatchProvider, type BatchReference as Experimental_BatchReference, type BatchRequest as Experimental_BatchRequest, type BatchStatus as Experimental_BatchStatus, type CancelBatchOptions as Experimental_CancelBatchOptions, type CancelBatchResult as Experimental_CancelBatchResult, type DownloadFunction as Experimental_DownloadFunction, type EvaluateEndEvent as Experimental_EvaluateEndEvent, type EvaluateStartEvent as Experimental_EvaluateStartEvent, type EvaluationAnswer as Experimental_EvaluationAnswer, type EvaluationModel as Experimental_EvaluationModel, type EvaluationModelCallEndEvent as Experimental_EvaluationModelCallEndEvent, type EvaluationModelCallStartEvent as Experimental_EvaluationModelCallStartEvent, type EvaluationProviderRegistry as Experimental_EvaluationProviderRegistry, type EvaluationQuestion as Experimental_EvaluationQuestion, type EvaluationResult as Experimental_EvaluationResult, Experimental_EvaluationUnsupportedQuestionTypeError, type Experimental_GeneratedImage, type GetBatchResultsOptions as Experimental_GetBatchResultsOptions, type GetBatchStatusOptions as Experimental_GetBatchStatusOptions, type ImageBatchGenerationResult as Experimental_ImageBatchGenerationResult, type ImageBatchItemResult as Experimental_ImageBatchItemResult, type ImageBatchRequest as Experimental_ImageBatchRequest, type InferAgentUIMessage as Experimental_InferAgentUIMessage, type InferAgentUIMessage, type LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_LogWarningsFunction, type LogWarningsFunction, type RealtimeClientEvent as Experimental_RealtimeClientEvent, type RealtimeFactory as Experimental_RealtimeFactory, type RealtimeFactoryGetTokenOptions as Experimental_RealtimeFactoryGetTokenOptions, type RealtimeFactoryGetTokenResult as Experimental_RealtimeFactoryGetTokenResult, type RealtimeModel as Experimental_RealtimeModel, type RealtimeServerEvent as Experimental_RealtimeServerEvent, type RealtimeSessionConfig as Experimental_RealtimeSessionConfig, type RealtimeSessionOptions as Experimental_RealtimeSessionOptions, type RealtimeSessionState as Experimental_RealtimeSessionState, type RealtimeSetupResponse as Experimental_RealtimeSetupResponse, type RealtimeState as Experimental_RealtimeState, type RealtimeStatus as Experimental_RealtimeStatus, type RealtimeToolDefinition as Experimental_RealtimeToolDefinition, type Experimental_SandboxProcess, type Experimental_SandboxSession, type Experimental_SpeechResult, type StartBatchOptions as Experimental_StartBatchOptions, type StartBatchResult as Experimental_StartBatchResult, type StreamTranscriptionEndEvent as Experimental_StreamTranscriptionEndEvent, type StreamTranscriptionStartEvent as Experimental_StreamTranscriptionStartEvent, type StreamTranslationResult as Experimental_StreamTranslationResult, type TextBatchGenerationResult as Experimental_TextBatchGenerationResult, type TextBatchItemResult as Experimental_TextBatchItemResult, type TextBatchRequest as Experimental_TextBatchRequest, type Experimental_ToolCallerTool, type Experimental_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FilePart, type FileUIPart, type FinishReason, type FlexibleSchema, type GatewayAsyncJobMetadata, type GatewayModelId, type GatewayProviderMetadata, type GenerateImageCall, type GenerateImageResult, type GenerateObjectEndEvent, type GenerateObjectResult, type GenerateObjectStartEvent, type GenerateObjectStepEndEvent, type GenerateObjectStepStartEvent, type GenerateSpeechEndEvent, type GenerateSpeechStartEvent, type GenerateTextAbortEvent, type GenerateTextEndEvent, type GenerateTextInclude, type GenerateTextOnAbortCallback, type GenerateTextOnEndCallback, type GenerateTextOnFinishCallback, type GenerateTextOnStartCallback, type GenerateTextOnStepEndCallback, type GenerateTextOnStepFinishCallback, type GenerateTextOnStepStartCallback, type GenerateTextResult, type GenerateTextStartEvent, type GenerateTextStepEndEvent, type GenerateTextStepStartEvent, type GenerateVideoPrompt, type GenerateVideoResult, type GeneratedAudioFile, type GeneratedFile, type GenericToolApprovalFunction, type GetVideoStatusResult, type HttpChatTransportInitOptions, type IdGenerator, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type ImagePart, type InferCompleteOutput as InferGenerateOutput, type InferSchema, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferToolInput, type InferToolOutput, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidPromptError, InvalidResponseDataError, JSONParseError, type JSONSchema7, type JSONValue, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, LoadAPIKeyError, LoadSettingError, type ModelInfo, type ModelMessage, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output_d_exports as Output, type OutputChunkTimingStats, type Output as OutputInterface, type PrepareReconnectToStreamRequest, type PrepareSendMessagesRequest, type PrepareStepFunction, type PrepareStepResult, type Prompt, type Provider, type ProviderMetadata, type ProviderReference, type ProviderRegistryProvider, type ReasoningFileOutput, type ReasoningFileUIPart, type ReasoningOutput, type ReasoningUIPart, type RepairTextFunction, type RequestOptions, type RerankEndEvent, type RerankResult, type RerankStartEvent, type RerankingModel, type RerankingModelCallEndEvent, type RerankingModelCallStartEvent, type SafeValidateUIMessagesResult, type Schema, type SingleToolApprovalFunction, type SourceDocumentUIPart, type SourceUrlUIPart, type SpeechModel, type SpeechModelResponseMetadata, type SpeechResult, type StartVideoResult, type StaticToolCall, type StaticToolError, type StaticToolOutputDenied, type StaticToolResult, type StepResult, type StepResultPerformance, type StepStartUIPart, type StopCondition, type StreamObjectOnFinishCallback, type StreamObjectResult, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type SystemModelMessage, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, type TextPart, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, TooManyEmbeddingValuesForCallError, type Tool, type ToolApprovalConfiguration, type ToolApprovalRequest, type ToolApprovalRequestOutput, type ToolApprovalResponse, type ToolApprovalResponseOutput, type ToolApprovalStatus, type ToolCallPart, type ToolCallRepairFunction, type ToolChoice, type ToolContent, type ToolExecuteFunction, type ToolExecutionEndEvent, type ToolExecutionOptions, type ToolExecutionStartEvent, type ToolInputRefinement, type ToolModelMessage, type ToolOrder, type ToolOutputErrorUIPart, type ToolResultPart, type ToolSet, type ToolUIPart, type TranscriptionEndEvent, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStartEvent, type TranscriptionStreamPart, TypeValidationError, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UnsupportedFunctionalityError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type UserContent, type UserModelMessage, type Warning, asSchema, createGateway, createIdGenerator, dynamicTool, cancelBatch as experimental_cancelBatch, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, evaluate as experimental_evaluate, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_toolCaller, experimental_transcribe, gateway, generateId$1 as generateId, isStepCount as stepCountIs, jsonSchema, parseJsonEventStream, tool$1 as tool, zodSchema };
|
|
10347
10545
|
//# sourceMappingURL=index.d.ts.map
|