EmbeddingProvider

Trait EmbeddingProvider 

Source
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§

Source

fn embed_batch(&self, texts: Vec<String>) -> Result<Vec<Vec<f32>>>

Generate embeddings for a batch of text

Source

fn dimension(&self) -> usize

Get the dimension of the embeddings

Source

fn model_name(&self) -> &str

Get the model name

Implementors§