pub trait EmbeddingModel:
Send
+ Sync
+ Debug
+ DynClone {
// Required method
fn embed<'life0, 'async_trait>(
&'life0 self,
input: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Embeddings, LanguageModelError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn name(&self) -> &'static str { ... }
}
Expand description
Embeds a list of strings and returns its embeddings. Assumes the strings will be moved.