llm_chain::traitsTrait Embeddings
Source pub trait Embeddings {
type Error: Send + Debug + Error + EmbeddingsError;
// Required methods
fn embed_texts<'life0, 'async_trait>(
&'life0 self,
texts: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn embed_query<'life0, 'async_trait>(
&'life0 self,
query: String,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}