pub trait Embedder {
type Error: Error + Send + Sync + 'static;
// Required methods
fn embed(&self, text: &str) -> Result<Vec<f32>>;
fn embed_batch(&self, texts: &[&str]) -> Result<Vec<Vec<f32>>>;
fn dimension(&self) -> usize;
fn is_ready(&self) -> bool;
}Expand description
Text embedding abstraction for converting text to vector representations
§Synchronous Version
This trait provides synchronous operations for text embeddings.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".