Expand description
Local embeddings via fastembed-rs (nomic-embed-text-v1.5, 768 dim).
Module layout:
embedder— public API (Embedder,EMBED_DIM), lazy init, backend traitbatching— byte-cap enforcement, batch chunking, output validationverify— ONNX SHA-256 hash verification (cache-poisoning gate)vec_math— cosine similarity helper
Re-exports§
pub use vec_math::cosine;
Modules§
- vec_
math - Cosine similarity helper.
Structs§
- Embedder
- Lazy fastembed wrapper. Model is loaded on first
embed()call.
Constants§
- EMBED_
DIM - Expected embedding dimension for
NomicEmbedTextV15.
Functions§
- has_
cached_ model - True if
cache_dirholds an.onnxfile at leastmin_size_bytesin size (recursive scan). Encapsulates the model-cache layout so callers (e.g.ckg setup) don’t reimplement the walk.