Skip to main content

ErasedEmbeddingModel

Trait ErasedEmbeddingModel 

Source
pub trait ErasedEmbeddingModel: Send + Sync {
    // Required methods
    fn embed_erased<'a>(
        &'a self,
        texts: &'a [&'a str],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'a>>;
    fn dimensions(&self) -> usize;
}
Expand description

Object-safe wrapper for EmbeddingModel.

Required Methods§

Source

fn embed_erased<'a>( &'a self, texts: &'a [&'a str], ) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'a>>

Source

fn dimensions(&self) -> usize

Implementors§