Trait EmbeddingModel
Source pub trait EmbeddingModel: Send + Sync {
// Required methods
fn embed_text<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Embedding, EmbeddingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn embed_texts<'life0, 'async_trait>(
&'life0 self,
input: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn ndims(&self) -> usize;
}