Skip to main content

Module embedder

Module embedder 

Source
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§

BgeM3DeriveConfig
Configuration for deriving sparse and multi-vec representations from dense embeddings when the backend (Ollama) does not natively expose them.
BgeM3Embedder
BGE-M3 multi-function embedder via Ollama.
MockEmbedder
Deterministic embedder for unit tests.
MultiFunctionEmbedding
Result of a single multi-function embedding call containing all three representations produced from one model invocation.
MultiVectorEmbedding
ColBERT-style multi-vector representation (per-token embeddings).
OllamaEmbedder
Embedding provider that calls Ollama’s /api/embed endpoint.
SparseWeights
Sparse weight representation for generic or model-native sparse retrieval.

Traits§

Embedder
Trait for embedding text into vectors.
MultiFunctionEmbedder
Trait for embedders that produce multiple representations from a single model call: dense, sparse, and multi-vector.

Type Aliases§

EmbedBatchFuture
Boxed future type alias for batch embedding results.
EmbedFuture
Boxed future type alias for single embedding results.
MultiEmbedBatchFuture
Boxed future type alias for batch multi-function embedding results.
MultiEmbedFuture
Boxed future type alias for single multi-function embedding results.
OptionalMultiEmbedBatchFuture
Boxed future type alias for optional batched multi-function output.
OptionalMultiEmbedFuture
Boxed future type alias for an embedder’s optional multi-function output.