Expand description
Embedding trait and implementations.
Provides the Embedder trait for text-to-vector conversion,
with [CandleEmbedder] (default, in-process pure-Rust), OllamaEmbedder
(external Ollama server), and MockEmbedder (testing).
Structs§
- BgeM3
Derive Config - Configuration for deriving sparse and multi-vec representations from dense embeddings when the backend (Ollama) does not natively expose them.
- BgeM3
Embedder - BGE-M3 multi-function embedder via Ollama.
- Mock
Embedder - Deterministic embedder for unit tests.
- Multi
Function Embedding - Result of a single multi-function embedding call containing all three representations produced from one model invocation.
- Multi
Vector Embedding - ColBERT-style multi-vector representation (per-token embeddings).
- Ollama
Embedder - Embedding provider that calls Ollama’s
/api/embedendpoint. - Sparse
Weights - Sparse weight representation for generic or model-native sparse retrieval.
Traits§
- Embedder
- Trait for embedding text into vectors.
- Multi
Function Embedder - Trait for embedders that produce multiple representations from a single model call: dense, sparse, and multi-vector.
Type Aliases§
- Embed
Batch Future - Boxed future type alias for batch embedding results.
- Embed
Future - Boxed future type alias for single embedding results.
- Multi
Embed Batch Future - Boxed future type alias for batch multi-function embedding results.
- Multi
Embed Future - Boxed future type alias for single multi-function embedding results.
- Optional
Multi Embed Batch Future - Boxed future type alias for optional batched multi-function output.
- Optional
Multi Embed Future - Boxed future type alias for an embedder’s optional multi-function output.