Expand description
Embedding provider trait and vector utilities.
Defines the EmbeddingProvider trait that all embedding backends
implement, plus pure helper functions for vector serialization and
similarity computation.
Concrete provider implementations (OpenAI, Ollama, fastembed, tract)
live in the context-harness app crate.
Traits§
- Embedding
Provider - Trait for embedding providers.
Functions§
- blob_
to_ vec - Decode a BLOB back into a float vector.
- cosine_
similarity - Compute cosine similarity between two embedding vectors.
- vec_
to_ blob - Encode a float vector as a BLOB (little-endian f32 bytes).