pub trait EmbeddingsService:
Send
+ Sync
+ 'static {
// Required method
fn create_embeddings<'life0, 'life1, 'async_trait>(
&'life0 self,
model: &'life1 str,
inputs: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait that describes an embeddings-capable service.
Required Methods§
Sourcefn create_embeddings<'life0, 'life1, 'async_trait>(
&'life0 self,
model: &'life1 str,
inputs: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_embeddings<'life0, 'life1, 'async_trait>(
&'life0 self,
model: &'life1 str,
inputs: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate embeddings for the provided inputs using the given model name.