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​

  • EmbeddingModelV4

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​

EmbeddingModelV4.maxEmbeddingsPerCall


modelId​

• Readonly modelId: string

Implementation of​

EmbeddingModelV4.modelId


options​

• Optional Readonly options: ActivityOptions


provider​

• Readonly provider: "temporal"

Implementation of​

EmbeddingModelV4.provider


specificationVersion​

• Readonly specificationVersion: "v4"

Implementation of​

EmbeddingModelV4.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​

EmbeddingModelV4.supportsParallelCalls

Methods​

doEmbed​

▸ doEmbed(options): Promise<EmbeddingModelV4Result>

Parameters​

NameType
optionsEmbeddingModelV4CallOptions

Returns​

Promise<EmbeddingModelV4Result>

Implementation of​

EmbeddingModelV4.doEmbed