mentedb_embedding/lib.rs
1//! Embedding model integration for MenteDB.
2//!
3//! Provides a trait-based architecture for embedding providers with built-in
4//! caching and a hash-based provider for testing.
5
6/// LRU embedding cache with hit/miss tracking.
7pub mod cache;
8/// Local embedding provider using Candle (pure Rust ML framework).
9#[cfg(feature = "local")]
10pub mod candle_provider;
11/// Deterministic hash based embedding provider for testing.
12pub mod hash_provider;
13/// HTTP based embedding provider for remote model APIs.
14pub mod http_provider;
15/// Embedding manager that wraps providers with caching.
16pub mod manager;
17/// Trait definitions for sync and async embedding providers.
18pub mod provider;
19
20pub use cache::{CacheStats, CachedEmbedding, EmbeddingCache};
21#[cfg(feature = "local")]
22pub use candle_provider::CandleEmbeddingProvider;
23pub use hash_provider::HashEmbeddingProvider;
24pub use http_provider::{HttpEmbeddingConfig, HttpEmbeddingProvider};
25pub use manager::{EmbeddingManager, EmbeddingStats};
26pub use provider::{AsyncEmbeddingProvider, EmbeddingProvider};