Skip to main content

Class: TemporalEmbeddingModel

aisdk.TemporalEmbeddingModel

An embedding model implementation that delegates embedding generation to Temporal activities. This allows workflows to generate embeddings through the Temporal execution model.

The AI SDK integration is an experimental feature; APIs may change without notice.

Implements

  • EmbeddingModelV3

Constructors

constructor

new TemporalEmbeddingModel(modelId, options?): TemporalEmbeddingModel

Parameters

NameType
modelIdstring
options?ActivityOptions

Returns

TemporalEmbeddingModel

Properties

maxEmbeddingsPerCall

Readonly maxEmbeddingsPerCall: undefined

Undefined to let the underlying provider handle chunking, as it knows its own limits.

Implementation of

EmbeddingModelV3.maxEmbeddingsPerCall


modelId

Readonly modelId: string

Implementation of

EmbeddingModelV3.modelId


options

Optional Readonly options: ActivityOptions


provider

Readonly provider: "temporal"

Implementation of

EmbeddingModelV3.provider


specificationVersion

Readonly specificationVersion: "v3"

Implementation of

EmbeddingModelV3.specificationVersion


supportsParallelCalls

Readonly supportsParallelCalls: true

Indicates the underlying embedding model API can handle concurrent requests. Set to true since we delegate to the actual provider which manages its own concurrency.

Implementation of

EmbeddingModelV3.supportsParallelCalls

Methods

doEmbed

doEmbed(options): Promise<EmbeddingModelV3Result>

Parameters

NameType
optionsEmbeddingModelV3CallOptions

Returns

Promise<EmbeddingModelV3Result>

Implementation of

EmbeddingModelV3.doEmbed