use crate::error::MemoryResult;
pub trait Embedder: Send + Sync {
fn dimension(&self) -> usize;
fn embed(&self, text: &str) -> MemoryResult<Vec<f32>>;
fn embed_batch(&self, texts: &[&str]) -> MemoryResult<Vec<Vec<f32>>> {
texts.iter().map(|t| self.embed(t)).collect()
}
}