pub trait EmbeddingProvider: Send + Sync {
// Required methods
fn embed_batch(&self, texts: Vec<String>) -> Result<Vec<Vec<f32>>>;
fn dimension(&self) -> usize;
fn model_name(&self) -> &str;
}Expand description
Trait for embedding generation
Required Methods§
Sourcefn embed_batch(&self, texts: Vec<String>) -> Result<Vec<Vec<f32>>>
fn embed_batch(&self, texts: Vec<String>) -> Result<Vec<Vec<f32>>>
Generate embeddings for a batch of text
Sourcefn model_name(&self) -> &str
fn model_name(&self) -> &str
Get the model name