Trait Embedder

Source
pub trait Embedder: Send + Sync {
    // Required methods
    fn embed_documents<'life0, 'life1, 'async_trait>(
        &'life0 self,
        documents: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f64>>, EmbedderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn embed_query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        text: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<f64>, EmbedderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn embed_documents<'life0, 'life1, 'async_trait>( &'life0 self, documents: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f64>>, EmbedderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn embed_query<'life0, 'life1, 'async_trait>( &'life0 self, text: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<f64>, EmbedderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§