ai 7.0.109 → 7.0.111
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 +14 -0
- package/dist/index.d.ts +152 -41
- package/dist/index.js +232 -64
- package/dist/index.js.map +1 -1
- package/dist/internal/index.d.ts +141 -2
- package/dist/internal/index.js +13 -1
- package/dist/internal/index.js.map +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +1 -0
- package/docs/03-ai-sdk-core/32-evaluation.mdx +11 -1
- package/docs/03-ai-sdk-core/60-telemetry.mdx +56 -3
- package/docs/03-ai-sdk-core/65-lifecycle-callbacks.mdx +124 -2
- package/docs/07-reference/01-ai-sdk-core/14-evaluate.mdx +16 -9
- package/package.json +4 -4
- package/src/batch/batch.ts +18 -3
- package/src/evaluate/evaluate-events.ts +131 -0
- package/src/evaluate/evaluate.ts +145 -40
- package/src/evaluate/index.ts +6 -0
- package/src/evaluate/restricted-telemetry-dispatcher.ts +46 -0
- package/src/generate-text/convert-language-model-content.ts +15 -6
- package/src/generate-text/generate-text.ts +7 -2
- package/src/generate-text/resolve-generated-file-data.ts +41 -0
- package/src/generate-text/stream-language-model-call.ts +5 -4
- package/src/telemetry/create-telemetry-dispatcher.ts +12 -0
- package/src/telemetry/telemetry.ts +34 -0
- package/src/telemetry/tracing-channel.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.111
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 31d24ce: feat: add telemetry support to `experimental_evaluate`
|
|
8
|
+
- a65bfd9: fix(ai): securely download URL-backed language model file outputs so generated files expose actual base64 and byte content and UI streams contain valid data URLs. Propagate cancellation to batch file downloads.
|
|
9
|
+
|
|
10
|
+
## 7.0.110
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [49295bb]
|
|
15
|
+
- @ai-sdk/gateway@4.0.89
|
|
16
|
+
|
|
3
17
|
## 7.0.109
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EmbeddingModelV4Embedding, EmbeddingModelV4, EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV2ProviderMetadata, ImageModelV4, ImageModelV3, ImageModelV2, ImageModelV4Middleware, JSONValue as JSONValue$1, LanguageModelV4Source, SharedV4Warning, LanguageModelV4, LanguageModelV3, LanguageModelV2, LanguageModelV4Middleware, RerankingModelV4, RerankingModelV3, SharedV4ProviderMetadata, SharedV4ProviderReference, SpeechModelV4, SpeechModelV3, SpeechModelV2, TranscriptionModelV4, TranscriptionModelV3, TranscriptionModelV2, JSONObject, ImageModelV4Usage, LanguageModelV4CallOptions, LanguageModelV4Prompt, AISDKError, LanguageModelV4ToolCall, JSONSchema7, ProviderV4, ProviderV3, ProviderV2, SharedV4Headers, Experimental_BatchV4Status, Experimental_BatchV4Error, Experimental_BatchV4, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, LanguageModelV4ToolChoice, LanguageModelV4Content,
|
|
1
|
+
import { EmbeddingModelV4Embedding, EmbeddingModelV4, EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV4Middleware, ImageModelV4ProviderMetadata, ImageModelV2ProviderMetadata, ImageModelV4, ImageModelV3, ImageModelV2, ImageModelV4Middleware, JSONValue as JSONValue$1, LanguageModelV4Source, SharedV4Warning, LanguageModelV4, LanguageModelV3, LanguageModelV2, LanguageModelV4Middleware, RerankingModelV4, RerankingModelV3, SharedV4ProviderMetadata, SharedV4ProviderReference, SpeechModelV4, SpeechModelV3, SpeechModelV2, TranscriptionModelV4, TranscriptionModelV3, TranscriptionModelV2, JSONObject, ImageModelV4Usage, Experimental_EvaluationModelV4Question, Experimental_EvaluationModelV4Result, Experimental_EvaluationModelV4, Experimental_EvaluationModelV4CallOptions, LanguageModelV4CallOptions, LanguageModelV4Prompt, AISDKError, LanguageModelV4ToolCall, JSONSchema7, ProviderV4, ProviderV3, ProviderV2, SharedV4Headers, Experimental_BatchV4Status, Experimental_BatchV4Error, Experimental_BatchV4, Experimental_BatchV4ModelIds, Experimental_BatchV4StartResult, LanguageModelV4ToolChoice, LanguageModelV4Content, JSONParseError, TypeValidationError, Experimental_VideoModelV4, Experimental_VideoModelV3, Experimental_VideoModelV4FrameType, Experimental_VideoModelV4OperationWebhook, Experimental_VideoModelV4OperationStatusResult, EmbeddingModelV4CallOptions, Experimental_RealtimeModelV4ServerEvent, Experimental_RealtimeModelV4, Experimental_RealtimeModelV4SessionConfig, Experimental_RealtimeModelV4ClientEvent, Experimental_RealtimeFactoryV4, Experimental_RealtimeFactoryV4GetTokenOptions, Experimental_RealtimeFactoryV4GetTokenResult, Experimental_RealtimeModelV4ToolDefinition, FilesV4, SkillsV4, NoSuchModelError, SharedV4AudioFormat, Experimental_SpeechTranslationModelV4, Experimental_SpeechTranslationModelV4Usage, FilesV4UploadFileCallOptions, SkillsV4UploadSkillResult, SkillsV4UploadSkillCallOptions, SkillsV4File } from '@ai-sdk/provider';
|
|
2
2
|
export { AISDKError, APICallError, EmptyResponseBodyError, Experimental_EvaluationUnsupportedQuestionTypeError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
|
|
3
3
|
import { GatewayModelId } from '@ai-sdk/gateway';
|
|
4
4
|
export { GatewayAsyncJobMetadata, GatewayModelId, GatewayProviderMetadata, createGateway, gateway } from '@ai-sdk/gateway';
|
|
@@ -519,6 +519,128 @@ type EmbeddingModelCallEndEvent = {
|
|
|
519
519
|
readonly usage: EmbeddingModelUsage;
|
|
520
520
|
};
|
|
521
521
|
|
|
522
|
+
type EvaluationModel = string | Experimental_EvaluationModelV4;
|
|
523
|
+
type EvaluationQuestion = Experimental_EvaluationModelV4Question;
|
|
524
|
+
type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
|
|
525
|
+
type: 'choice';
|
|
526
|
+
criteria: infer CRITERIA;
|
|
527
|
+
} ? {
|
|
528
|
+
type: 'choice';
|
|
529
|
+
choice: Extract<keyof CRITERIA, string>;
|
|
530
|
+
probabilities?: Record<Extract<keyof CRITERIA, string>, number>;
|
|
531
|
+
} : QUESTION extends {
|
|
532
|
+
type: 'score';
|
|
533
|
+
} ? {
|
|
534
|
+
type: 'score';
|
|
535
|
+
score: number;
|
|
536
|
+
probabilities?: Record<string, number>;
|
|
537
|
+
} : {
|
|
538
|
+
type: 'boolean';
|
|
539
|
+
probability: number;
|
|
540
|
+
};
|
|
541
|
+
type EvaluationResult<QUESTIONS extends Record<string, EvaluationQuestion>> = {
|
|
542
|
+
readonly answers: {
|
|
543
|
+
[ID in keyof QUESTIONS]: EvaluationAnswer<QUESTIONS[ID]>;
|
|
544
|
+
};
|
|
545
|
+
readonly usage: {
|
|
546
|
+
inputTokens: number | undefined;
|
|
547
|
+
outputTokens: number | undefined;
|
|
548
|
+
totalTokens: number | undefined;
|
|
549
|
+
};
|
|
550
|
+
readonly warnings: Experimental_EvaluationModelV4Result['warnings'];
|
|
551
|
+
readonly rounding: Experimental_EvaluationModelV4Result['rounding'];
|
|
552
|
+
readonly providerMetadata: Experimental_EvaluationModelV4Result['providerMetadata'];
|
|
553
|
+
readonly response: NonNullable<Experimental_EvaluationModelV4Result['response']> & {
|
|
554
|
+
timestamp: Date;
|
|
555
|
+
modelId: string;
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Event passed to the `onStart` callback for evaluation operations.
|
|
561
|
+
*
|
|
562
|
+
* Called when the operation begins, before the evaluation model is called.
|
|
563
|
+
*/
|
|
564
|
+
type EvaluateStartEvent<RUNTIME_CONTEXT extends Context = Context> = {
|
|
565
|
+
/** User-defined runtime context. */
|
|
566
|
+
readonly runtimeContext: RUNTIME_CONTEXT;
|
|
567
|
+
/** Unique identifier for this evaluation call, used to correlate events. */
|
|
568
|
+
readonly callId: string;
|
|
569
|
+
/** Identifies the operation type (`ai.evaluate`). */
|
|
570
|
+
readonly operationId: 'ai.evaluate';
|
|
571
|
+
/** The provider identifier. */
|
|
572
|
+
readonly provider: string;
|
|
573
|
+
/** The evaluation model identifier. */
|
|
574
|
+
readonly modelId: string;
|
|
575
|
+
/** The shared state being evaluated. */
|
|
576
|
+
readonly state: Experimental_EvaluationModelV4CallOptions['state'];
|
|
577
|
+
/** The questions being evaluated against the shared state. */
|
|
578
|
+
readonly questions: Readonly<Record<string, EvaluationQuestion>>;
|
|
579
|
+
/** Maximum number of retries for the evaluation model call. */
|
|
580
|
+
readonly maxRetries: number;
|
|
581
|
+
/** Additional HTTP headers sent with the request. */
|
|
582
|
+
readonly headers: Record<string, string> | undefined;
|
|
583
|
+
/** Additional provider-specific options. */
|
|
584
|
+
readonly providerOptions: ProviderOptions;
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Event passed to the `onEnd` callback for evaluation operations.
|
|
588
|
+
*
|
|
589
|
+
* Called when the operation completes successfully.
|
|
590
|
+
*/
|
|
591
|
+
type EvaluateEndEvent<RUNTIME_CONTEXT extends Context = Context> = EvaluateStartEvent<RUNTIME_CONTEXT> & {
|
|
592
|
+
/** Exactly one typed answer per question ID. */
|
|
593
|
+
readonly answers: EvaluationResult<Record<string, EvaluationQuestion>>['answers'];
|
|
594
|
+
/** Token usage for the evaluation operation. */
|
|
595
|
+
readonly usage: EvaluationResult<Record<string, EvaluationQuestion>>['usage'];
|
|
596
|
+
/** Warnings from the evaluation model. */
|
|
597
|
+
readonly warnings: EvaluationResult<Record<string, EvaluationQuestion>>['warnings'];
|
|
598
|
+
/** Provider-declared decimal precision for probabilities and scores. */
|
|
599
|
+
readonly rounding: EvaluationResult<Record<string, EvaluationQuestion>>['rounding'];
|
|
600
|
+
/** Optional provider-specific metadata. */
|
|
601
|
+
readonly providerMetadata: EvaluationResult<Record<string, EvaluationQuestion>>['providerMetadata'];
|
|
602
|
+
/** Response metadata, including the resolved model ID and timestamp. */
|
|
603
|
+
readonly response: EvaluationResult<Record<string, EvaluationQuestion>>['response'];
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* Event fired when the evaluation model call begins.
|
|
607
|
+
*
|
|
608
|
+
* The logical model call includes any provider retries.
|
|
609
|
+
*/
|
|
610
|
+
type EvaluationModelCallStartEvent = {
|
|
611
|
+
/** Unique identifier for the outer evaluation call. */
|
|
612
|
+
readonly callId: string;
|
|
613
|
+
/** Identifies the inner operation (`ai.evaluate.doEvaluate`). */
|
|
614
|
+
readonly operationId: 'ai.evaluate.doEvaluate';
|
|
615
|
+
/** The provider identifier. */
|
|
616
|
+
readonly provider: string;
|
|
617
|
+
/** The evaluation model identifier. */
|
|
618
|
+
readonly modelId: string;
|
|
619
|
+
/** The shared state being evaluated. */
|
|
620
|
+
readonly state: Experimental_EvaluationModelV4CallOptions['state'];
|
|
621
|
+
/** The questions being evaluated against the shared state. */
|
|
622
|
+
readonly questions: Readonly<Record<string, EvaluationQuestion>>;
|
|
623
|
+
};
|
|
624
|
+
/**
|
|
625
|
+
* Event fired after the evaluation model response has been validated.
|
|
626
|
+
*
|
|
627
|
+
* Contains the result of the logical model call, including any retries.
|
|
628
|
+
*/
|
|
629
|
+
type EvaluationModelCallEndEvent = EvaluationModelCallStartEvent & {
|
|
630
|
+
/** Exactly one answer per question ID. */
|
|
631
|
+
readonly answers: Experimental_EvaluationModelV4Result['answers'];
|
|
632
|
+
/** Token usage reported by the evaluation model. */
|
|
633
|
+
readonly usage?: Experimental_EvaluationModelV4Result['usage'];
|
|
634
|
+
/** Warnings from the evaluation model. */
|
|
635
|
+
readonly warnings: Experimental_EvaluationModelV4Result['warnings'];
|
|
636
|
+
/** Provider-declared decimal precision for probabilities and scores. */
|
|
637
|
+
readonly rounding?: Experimental_EvaluationModelV4Result['rounding'];
|
|
638
|
+
/** Optional provider-specific metadata. */
|
|
639
|
+
readonly providerMetadata?: Experimental_EvaluationModelV4Result['providerMetadata'];
|
|
640
|
+
/** Optional raw response metadata from the provider. */
|
|
641
|
+
readonly response?: Experimental_EvaluationModelV4Result['response'];
|
|
642
|
+
};
|
|
643
|
+
|
|
522
644
|
/**
|
|
523
645
|
* Model-facing generation controls. These settings influence how the model
|
|
524
646
|
* generates its response (token limits, sampling, penalties, stop sequences,
|
|
@@ -4306,7 +4428,7 @@ type RerankingModelCallEndEvent = {
|
|
|
4306
4428
|
};
|
|
4307
4429
|
|
|
4308
4430
|
declare const AI_SDK_TELEMETRY_TRACING_CHANNEL = "ai:telemetry";
|
|
4309
|
-
type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank';
|
|
4431
|
+
type TelemetryTracingEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank' | 'experimental_evaluate';
|
|
4310
4432
|
type TelemetryTracingChannelMessage<EVENT = unknown> = {
|
|
4311
4433
|
readonly type: TelemetryTracingEventType;
|
|
4312
4434
|
readonly event: EVENT;
|
|
@@ -4410,6 +4532,20 @@ interface Telemetry {
|
|
|
4410
4532
|
* Contains the ranking results from the model response.
|
|
4411
4533
|
*/
|
|
4412
4534
|
onRerankEnd?: Callback<InferTelemetryEvent<RerankingModelCallEndEvent>>;
|
|
4535
|
+
/** Called when an experimental evaluation operation begins. */
|
|
4536
|
+
experimental_onEvaluateStart?: Callback<InferTelemetryEvent<EvaluateStartEvent>>;
|
|
4537
|
+
/**
|
|
4538
|
+
* Called immediately before an experimental evaluation model call begins.
|
|
4539
|
+
* The logical model call includes any provider retries.
|
|
4540
|
+
*/
|
|
4541
|
+
experimental_onEvaluationModelCallStart?: Callback<InferTelemetryEvent<EvaluationModelCallStartEvent>>;
|
|
4542
|
+
/**
|
|
4543
|
+
* Called after an experimental evaluation model response has been validated.
|
|
4544
|
+
* The logical model call includes any provider retries.
|
|
4545
|
+
*/
|
|
4546
|
+
experimental_onEvaluationModelCallEnd?: Callback<InferTelemetryEvent<EvaluationModelCallEndEvent>>;
|
|
4547
|
+
/** Called when an experimental evaluation operation completes. */
|
|
4548
|
+
experimental_onEvaluateEnd?: Callback<InferTelemetryEvent<EvaluateEndEvent>>;
|
|
4413
4549
|
/**
|
|
4414
4550
|
* Called when an operation completes. Fired for text generation
|
|
4415
4551
|
* (generateText/streamText), object generation (generateObject/streamObject),
|
|
@@ -7610,45 +7746,8 @@ declare class RetryError extends AISDKError {
|
|
|
7610
7746
|
static isInstance(error: unknown): error is RetryError;
|
|
7611
7747
|
}
|
|
7612
7748
|
|
|
7613
|
-
type EvaluationModel = string | Experimental_EvaluationModelV4;
|
|
7614
|
-
type EvaluationQuestion = Experimental_EvaluationModelV4Question;
|
|
7615
|
-
type EvaluationAnswer<QUESTION extends EvaluationQuestion> = QUESTION extends {
|
|
7616
|
-
type: 'choice';
|
|
7617
|
-
criteria: infer CRITERIA;
|
|
7618
|
-
} ? {
|
|
7619
|
-
type: 'choice';
|
|
7620
|
-
choice: Extract<keyof CRITERIA, string>;
|
|
7621
|
-
probabilities?: Record<Extract<keyof CRITERIA, string>, number>;
|
|
7622
|
-
} : QUESTION extends {
|
|
7623
|
-
type: 'score';
|
|
7624
|
-
} ? {
|
|
7625
|
-
type: 'score';
|
|
7626
|
-
score: number;
|
|
7627
|
-
probabilities?: Record<string, number>;
|
|
7628
|
-
} : {
|
|
7629
|
-
type: 'boolean';
|
|
7630
|
-
probability: number;
|
|
7631
|
-
};
|
|
7632
|
-
type EvaluationResult<QUESTIONS extends Record<string, EvaluationQuestion>> = {
|
|
7633
|
-
readonly answers: {
|
|
7634
|
-
[ID in keyof QUESTIONS]: EvaluationAnswer<QUESTIONS[ID]>;
|
|
7635
|
-
};
|
|
7636
|
-
readonly usage: {
|
|
7637
|
-
inputTokens: number | undefined;
|
|
7638
|
-
outputTokens: number | undefined;
|
|
7639
|
-
totalTokens: number | undefined;
|
|
7640
|
-
};
|
|
7641
|
-
readonly warnings: Experimental_EvaluationModelV4Result['warnings'];
|
|
7642
|
-
readonly rounding: Experimental_EvaluationModelV4Result['rounding'];
|
|
7643
|
-
readonly providerMetadata: Experimental_EvaluationModelV4Result['providerMetadata'];
|
|
7644
|
-
readonly response: NonNullable<Experimental_EvaluationModelV4Result['response']> & {
|
|
7645
|
-
timestamp: Date;
|
|
7646
|
-
modelId: string;
|
|
7647
|
-
};
|
|
7648
|
-
};
|
|
7649
|
-
|
|
7650
7749
|
/** Evaluate typed questions against one shared state. Experimental. */
|
|
7651
|
-
declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuestion
|
|
7750
|
+
declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuestion>, RUNTIME_CONTEXT extends Context = Context>({ model: modelArg, state, questions, maxRetries, abortSignal, headers, providerOptions, telemetry, runtimeContext, onStart, onEnd, _internal: { generateCallId }, }: {
|
|
7652
7751
|
/** An evaluation model instance or an ID resolved by the configured default provider. */
|
|
7653
7752
|
model: EvaluationModel;
|
|
7654
7753
|
state: Experimental_EvaluationModelV4CallOptions['state'];
|
|
@@ -7658,6 +7757,18 @@ declare function evaluate<const QUESTIONS extends Record<string, EvaluationQuest
|
|
|
7658
7757
|
abortSignal?: AbortSignal;
|
|
7659
7758
|
headers?: Record<string, string>;
|
|
7660
7759
|
providerOptions?: ProviderOptions;
|
|
7760
|
+
/** Optional telemetry configuration. */
|
|
7761
|
+
telemetry?: TelemetryOptions<RUNTIME_CONTEXT>;
|
|
7762
|
+
/** User-defined runtime context. Treat runtime context as immutable. */
|
|
7763
|
+
runtimeContext?: RUNTIME_CONTEXT;
|
|
7764
|
+
/** Called when the evaluate operation begins. */
|
|
7765
|
+
onStart?: Callback<EvaluateStartEvent<RUNTIME_CONTEXT>>;
|
|
7766
|
+
/** Called when the evaluate operation completes. */
|
|
7767
|
+
onEnd?: Callback<EvaluateEndEvent<RUNTIME_CONTEXT>>;
|
|
7768
|
+
/** Internal. For test use only. May change without notice. */
|
|
7769
|
+
_internal?: {
|
|
7770
|
+
generateCallId?: () => string;
|
|
7771
|
+
};
|
|
7661
7772
|
}): Promise<EvaluationResult<QUESTIONS>>;
|
|
7662
7773
|
|
|
7663
7774
|
/**
|
|
@@ -10029,4 +10140,4 @@ declare function uploadSkill({ api, files, displayTitle, providerOptions, }: {
|
|
|
10029
10140
|
files: UploadSkillFile[];
|
|
10030
10141
|
}): Promise<UploadSkillResult>;
|
|
10031
10142
|
|
|
10032
|
-
export { AI_SDK_TELEMETRY_TRACING_CHANNEL, AbstractChat, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AsyncIterableStream, type CallSettings, 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 DataUIPart, type DeepPartial, DefaultChatTransport, DefaultGeneratedFile, DirectChatTransport, type DirectChatTransportOptions, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type EmbedEndEvent, type EmbedManyResult, type EmbedResult, type EmbedStartEvent, type Embedding, type EmbeddingModel, type EmbeddingModelCallEndEvent, type EmbeddingModelCallStartEvent, type EmbeddingModelMiddleware, type EmbeddingModelUsage, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, 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 EvaluationAnswer as Experimental_EvaluationAnswer, type EvaluationModel as Experimental_EvaluationModel, type EvaluationProviderRegistry as Experimental_EvaluationProviderRegistry, type EvaluationQuestion as Experimental_EvaluationQuestion, type EvaluationResult as Experimental_EvaluationResult, 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 LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_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_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_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FileUIPart, type FinishReason, 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, HttpChatTransport, type HttpChatTransportInitOptions, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type InferAgentUIMessage, type InferCompleteOutput as InferGenerateOutput, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolApprovalSignatureError, InvalidToolInputError, type JSONValue, JsonToSseTransformStream, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, type LogWarningsFunction, MessageConversionError, MissingToolResultsError, type ModelInfo, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, NoTranscriptGeneratedError, NoTranslationGeneratedError, NoVideoGeneratedError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output 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, RetryError, type SafeValidateUIMessagesResult, SerialJobExecutor, 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, StreamProviderError, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, TextStreamChatTransport, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, type ToolApprovalConfiguration, type ToolApprovalRequestOutput, type ToolApprovalResponseOutput, type ToolApprovalStatus, ToolCallNotFoundForApprovalError, ToolCallRepairError, type ToolCallRepairFunction, type ToolChoice, ToolChoiceViolationError, type ToolExecutionEndEvent, type ToolExecutionStartEvent, type ToolInputRefinement, ToolLoopAgent, type ToolLoopAgentSettings, type ToolOrder, type ToolOutputErrorUIPart, type ToolUIPart, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStreamPart, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, UIMessageStreamError, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertDataContentToBase64String, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createDownload, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultInstructionsMiddleware, defaultSettingsMiddleware, detectToolDrift, embed, embedMany, cancelBatch as experimental_cancelBatch, experimental_createProviderRegistry, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, evaluate as experimental_evaluate, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, experimental_generateVideo, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, experimental_getVideoStatus, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, experimental_startVideo, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, fingerprintTools, generateImage, generateObject, generateSpeech, generateText, getChunkTimeoutMs, getFirstChunkTimeoutMs, getStaticToolName, getStepTimeoutMs, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, getToolTimeoutMs, getTotalTimeoutMs, hasToolCall, isCustomContentUIPart, isDataUIPart, isDeepEqualData, isDynamicToolUIPart, isFileUIPart, isLoopFinished, isReasoningFileUIPart, isReasoningUIPart, isStaticToolUIPart, isStepCount, isTextUIPart, isToolOutputErrorUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, registerTelemetry, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, isStepCount as stepCountIs, streamObject, streamText, systemModelMessageSchema, toTextStream, toUIMessageChunk, toUIMessageStream, toolModelMessageSchema, toolSearch, transcribe, uiMessageChunkSchema, uploadFile, uploadSkill, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
|
|
10143
|
+
export { AI_SDK_TELEMETRY_TRACING_CHANNEL, AbstractChat, type ActiveTools, type Agent, type AgentCallParameters, type AgentStreamParameters, type AsyncIterableStream, type CallSettings, 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 DataUIPart, type DeepPartial, DefaultChatTransport, DefaultGeneratedFile, DirectChatTransport, type DirectChatTransportOptions, type DynamicToolCall, type DynamicToolError, type DynamicToolResult, type DynamicToolUIPart, type EmbedEndEvent, type EmbedManyResult, type EmbedResult, type EmbedStartEvent, type Embedding, type EmbeddingModel, type EmbeddingModelCallEndEvent, type EmbeddingModelCallStartEvent, type EmbeddingModelMiddleware, type EmbeddingModelUsage, type ErrorHandler, AbstractRealtimeSession as Experimental_AbstractRealtimeSession, ToolLoopAgent as Experimental_Agent, type ToolLoopAgentSettings as Experimental_AgentSettings, 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, 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 LanguageModelStreamPart as Experimental_LanguageModelStreamPart, type ListBatchesOptions as Experimental_ListBatchesOptions, type ListBatchesResult as Experimental_ListBatchesResult, type LogWarningsFunction as Experimental_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_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_ToolCallers, type Experimental_TranscriptionResult, type TranslationStreamPart as Experimental_TranslationStreamPart, type FileUIPart, type FinishReason, 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, HttpChatTransport, type HttpChatTransportInitOptions, type ImageModel, type ImageModelMiddleware, type ImageModelProviderMetadata, type ImageModelResponseMetadata, type ImageModelUsage, type InferAgentUIMessage, type InferCompleteOutput as InferGenerateOutput, type InferPartialOutput as InferStreamOutput, type InferTelemetryEvent, type InferUIDataParts, type InferUIMessageChunk, type InferUITool, type InferUITools, type Instructions, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolApprovalError, InvalidToolApprovalSignatureError, InvalidToolInputError, type JSONValue, JsonToSseTransformStream, type LanguageModel, type LanguageModelCallEndEvent, type LanguageModelCallOptions, type LanguageModelCallStartEvent, type LanguageModelMiddleware, type LanguageModelRequestMetadata, type LanguageModelResponseMetadata, type LanguageModelUsage, type LogWarningsFunction, MessageConversionError, MissingToolResultsError, type ModelInfo, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoSpeechGeneratedError, NoSuchProviderError, NoSuchToolError, NoTranscriptGeneratedError, NoTranslationGeneratedError, NoVideoGeneratedError, type ObjectStreamPart, type OnFinishEvent, type OnLanguageModelCallEndCallback, type OnLanguageModelCallStartCallback, type OnStartEvent, type OnStepFinishEvent, type OnStepStartEvent, type OnToolCallFinishEvent, type OnToolCallStartEvent, type OnToolExecutionEndCallback, type OnToolExecutionStartCallback, output 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, RetryError, type SafeValidateUIMessagesResult, SerialJobExecutor, 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, StreamProviderError, type StreamTextEndEvent, type StreamTextInclude, type StreamTextOnChunkCallback, type StreamTextOnEndCallback, type StreamTextOnErrorCallback, type StreamTextOnErrorResult, type StreamTextOnErrorRetryCallback, type StreamTextResult, type StreamTextTransform, type StreamTranscriptionResult, type Telemetry, type TelemetryOptions, type TelemetryTracingChannelMessage, type TelemetryTracingEventType, TextStreamChatTransport, type TextStreamPart, type TextUIPart, type TimeoutConfiguration, type ToUIMessageChunkOptions, type ToolApprovalConfiguration, type ToolApprovalRequestOutput, type ToolApprovalResponseOutput, type ToolApprovalStatus, ToolCallNotFoundForApprovalError, ToolCallRepairError, type ToolCallRepairFunction, type ToolChoice, ToolChoiceViolationError, type ToolExecutionEndEvent, type ToolExecutionStartEvent, type ToolInputRefinement, ToolLoopAgent, type ToolLoopAgentSettings, type ToolOrder, type ToolOutputErrorUIPart, type ToolUIPart, type TranscriptionModel, type TranscriptionModelResponseMetadata, type TranscriptionResult, type TranscriptionStreamPart, type TypedToolCall, type TypedToolError, type TypedToolOutputDenied, type TypedToolResult, type UIDataPartSchemas, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, UIMessageStreamError, type UIMessageStreamOnEndCallback, type UIMessageStreamOnFinishCallback, type UIMessageStreamOnStepEndCallback, type UIMessageStreamOnStepFinishCallback, type UIMessageStreamOptions, type UIMessageStreamOutcome, type UIMessageStreamWriter, type UIMessageStreamWriterWithOutcome, type UITool, type UIToolInvocation, type UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, type UploadFileResult, type UploadSkillResult, type UseCompletionOptions, type Warning, addToolInputExamplesMiddleware, assistantModelMessageSchema, callCompletionApi, consumeStream, convertDataContentToBase64String, convertFileListToFileUIParts, convertToModelMessages, cosineSimilarity, createAgentUIStream, createAgentUIStreamResponse, createDownload, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultEmbeddingSettingsMiddleware, defaultInstructionsMiddleware, defaultSettingsMiddleware, detectToolDrift, embed, embedMany, cancelBatch as experimental_cancelBatch, experimental_createProviderRegistry, decodeRealtimeAudio as experimental_decodeRealtimeAudio, encodeRealtimeAudio as experimental_encodeRealtimeAudio, evaluate as experimental_evaluate, filterActiveTools as experimental_filterActiveTools, experimental_generateSpeech, experimental_generateVideo, getBatchResults as experimental_getBatchResults, getBatchStatus as experimental_getBatchStatus, getRealtimeToolDefinitions as experimental_getRealtimeToolDefinitions, experimental_getVideoStatus, listBatches as experimental_listBatches, resampleAudio as experimental_resampleAudio, startBatch as experimental_startBatch, experimental_startVideo, streamLanguageModelCall as experimental_streamLanguageModelCall, streamTranscribe as experimental_streamTranscribe, streamTranslate as experimental_streamTranslate, experimental_transcribe, extractJsonMiddleware, extractReasoningMiddleware, fingerprintTools, generateImage, generateObject, generateSpeech, generateText, getChunkTimeoutMs, getFirstChunkTimeoutMs, getStaticToolName, getStepTimeoutMs, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, getToolTimeoutMs, getTotalTimeoutMs, hasToolCall, isCustomContentUIPart, isDataUIPart, isDeepEqualData, isDynamicToolUIPart, isFileUIPart, isLoopFinished, isReasoningFileUIPart, isReasoningUIPart, isStaticToolUIPart, isStepCount, isTextUIPart, isToolOutputErrorUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithApprovalResponses, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeAgentUIStreamToResponse, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, pruneMessages, readUIMessageStream, registerTelemetry, rerank, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, isStepCount as stepCountIs, streamObject, streamText, systemModelMessageSchema, toTextStream, toUIMessageChunk, toUIMessageStream, toolModelMessageSchema, toolSearch, transcribe, uiMessageChunkSchema, uploadFile, uploadSkill, userModelMessageSchema, validateUIMessages, wrapEmbeddingModel, wrapImageModel, wrapLanguageModel, wrapProvider };
|