rightkit_embed/lib.rs
1//! Local embeddings and a persistent cosine vector store.
2//!
3//! Feature boundaries: `inference` (ONNX text embedder) and `vector` (SQLite-backed
4//! cosine store). Both are default-on; a `vector`-only build does not pull ort or tokenizers.
5
6#[cfg(feature = "inference")]
7mod embedder;
8#[cfg(feature = "vector")]
9mod vector;
10
11#[cfg(feature = "inference")]
12pub use embedder::{
13 truncate_and_normalize, AcceleratorParity, EmbedError, Embedder, EmbedderConfig,
14 ExecutionProvider, ACCELERATOR_PARITY_MIN_COSINE, DEFAULT_MAX_BATCH, EMBEDDINGGEMMA2_MODEL_ID,
15 EMBEDDINGGEMMA_MODEL_ID,
16};
17#[cfg(feature = "vector")]
18pub use vector::{cosine_similarity, Nearest, VectorError, VectorStore, DEFAULT_VECTOR_DIM};