Skip to main content

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/// Native AWS Bedrock (Amazon Titan) embedding provider (sync ureq + SigV4).
7#[cfg(feature = "bedrock")]
8pub mod bedrock_provider;
9/// LRU embedding cache with hit/miss tracking.
10pub mod cache;
11/// Local embedding provider using Candle (pure Rust ML framework).
12#[cfg(feature = "local")]
13pub mod candle_provider;
14/// Deterministic hash based embedding provider for testing.
15pub mod hash_provider;
16/// HTTP based embedding provider for remote model APIs.
17pub mod http_provider;
18/// Embedding manager that wraps providers with caching.
19pub mod manager;
20/// Trait definitions for sync and async embedding providers.
21pub mod provider;
22
23#[cfg(feature = "bedrock")]
24pub use bedrock_provider::{AwsCredentials, BedrockEmbeddingConfig, BedrockEmbeddingProvider};
25pub use cache::{CacheStats, CachedEmbedding, EmbeddingCache};
26#[cfg(feature = "local")]
27pub use candle_provider::CandleEmbeddingProvider;
28pub use hash_provider::HashEmbeddingProvider;
29pub use http_provider::{HttpEmbeddingConfig, HttpEmbeddingProvider};
30pub use manager::{EmbeddingManager, EmbeddingStats};
31pub use provider::{AsyncEmbeddingProvider, EmbeddingProvider};