Skip to main content

Crate rskit_embedding

Crate rskit_embedding 

Source
Expand description

Embedding provider abstraction and vector utilities.

Structs§

EmbedRequest
Canonical embedding request.
EmbedResponse
Canonical embedding response.
Embedding
A single embedding vector.
EmbeddingOptions
Provider-specific embedding options.
InMemoryProvider
Deterministic embedding provider for tests and examples.
Model
Canonical model identity.
Usage
Token usage counters.

Enums§

EmbedAsset
Bytes or URL asset input.
EmbedInput
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.