pub trait EmbeddingProvider: CredentialProvider {
    // Required methods
    fn base_model(&self) -> Box<dyn LanguageModel>;
    fn embed_batch<'life0, 'async_trait>(
        &'life0 self,
        spans: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn max_tokens_per_batch(&self) -> usize;
    fn rate_limit_expiration(&self) -> Option<Instant>;
}

Required Methods§

source

fn base_model(&self) -> Box<dyn LanguageModel>

source

fn embed_batch<'life0, 'async_trait>( &'life0 self, spans: Vec<String> ) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn max_tokens_per_batch(&self) -> usize

source

fn rate_limit_expiration(&self) -> Option<Instant>

Implementors§