pub trait EmbeddingModel: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn version(&self) -> &str;
fn dimension(&self) -> u32;
fn embed_batch(&self, texts: &[&str]) -> OrbokResult<Vec<Vec<f32>>>;
}Expand description
Local embedding model abstraction (RFC-008 §6).
Implementations must not transmit text externally (NFR-001).
Required Methods§
Sourcefn embed_batch(&self, texts: &[&str]) -> OrbokResult<Vec<Vec<f32>>>
fn embed_batch(&self, texts: &[&str]) -> OrbokResult<Vec<Vec<f32>>>
Embed a batch of normalized texts. Returns one vector per input, each L2-normalized.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".