pub trait EmbeddingProvider: Send + Sync {
// Required methods
fn embed(&self, texts: &[String]) -> Result<Vec<Vec<f32>>, ProviderError>;
fn dim(&self) -> usize;
}Expand description
Embeds a batch of texts into dense vectors (one per input).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".