Skip to main content

Embedder

Trait Embedder 

Source
pub trait Embedder: Send + Sync {
    // Required methods
    fn embed(&self, text: &str) -> Result<Vec<f32>, ContextError>;
    fn dim(&self) -> usize;
}
Expand description

Text embedding seam.

Required Methods§

Source

fn embed(&self, text: &str) -> Result<Vec<f32>, ContextError>

Source

fn dim(&self) -> usize

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§