Expand description
Embedding provider abstraction and vector utilities.
Structs§
- Embed
Request - Canonical embedding request.
- Embed
Response - Canonical embedding response.
- Embedding
- A single embedding vector.
- Embedding
Options - Provider-specific embedding options.
- InMemory
Provider - Deterministic embedding provider for tests and examples.
- Model
- Canonical model identity.
- Usage
- Token usage counters.
Enums§
- Embed
Asset - Bytes or URL asset input.
- Embed
Input - Multimodal embedding input.
Traits§
- Provider
- Trait for canonical multimodal embedding providers.
Functions§
- cosine_
similarity - Compute the cosine similarity between two vectors.
- dot_
product - Compute the dot product of two vectors.
- euclidean_
distance - Compute the Euclidean (L2) distance between two vectors.
- max_
pooling - Compute the element-wise maximum of a collection of vectors.
- mean_
pooling - Compute the element-wise mean of a collection of vectors.
- normalize
- Normalize a vector to unit length.