Skip to main content

Embedder

Trait Embedder 

Source
pub trait Embedder {
    // Required methods
    fn embed(&self, texts: Vec<&str>) -> Result<Vec<Vec<f32>>, GraphError>;
    fn embed_single(&self, text: &str) -> Result<Vec<f32>, GraphError>;
    fn dimensions(&self) -> usize;
}
Expand description

Trait for embedding text into vectors.

Required Methods§

Source

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

Source

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

Source

fn dimensions(&self) -> usize

Implementors§