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