Skip to main content

Embedder

Trait Embedder 

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

Anything that can turn text into a vector.

Required Methods§

Source

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

Source

fn name(&self) -> &str

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§