Skip to main content

Module embedding_model

Module embedding_model 

Source
Expand description

The EmbeddingModel trait — the provider-facing interface for text embeddings.

Aligned with Vercel AI SDK EmbeddingModelV4 (reference/ai/packages/provider/src/embedding-model/v4/).

Providers implement EmbeddingModel::do_embed; users never call it directly.

Structs§

EmbeddingCallOptions
Options passed to EmbeddingModel::do_embed.
EmbeddingResponse
Debugging response info specific to embedding calls.
EmbeddingResult
The result of EmbeddingModel::do_embed.
EmbeddingUsage
Token usage for an embedding call. Embeddings only report input tokens.

Traits§

EmbeddingModel
The unified embedding model trait (provider-facing).

Functions§

embed
User-facing embedding operation with Core-owned retry and timeout.

Type Aliases§

Embedding
A single embedding vector.