project_rag/embedding/mod.rs
1mod fastembed_manager;
2
3pub use fastembed_manager::FastEmbedManager;
4
5use anyhow::Result;
6
7/// Trait for embedding generation
8pub trait EmbeddingProvider: Send + Sync {
9 /// Generate embeddings for a batch of text
10 fn embed_batch(&self, texts: Vec<String>) -> Result<Vec<Vec<f32>>>;
11
12 /// Get the dimension of the embeddings
13 fn dimension(&self) -> usize;
14
15 /// Get the model name
16 fn model_name(&self) -> &str;
17}