LlmWorker

Trait LlmWorker 

Source
pub trait LlmWorker: Send + Sync {
    // Required methods
    fn infer<'life0, 'async_trait>(
        &'life0 mut self,
        model: InferencingModel,
        prompt: String,
        params: InferencingParams,
    ) -> Pin<Box<dyn Future<Output = Result<InferencingResult, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn generate_embeddings<'life0, 'async_trait>(
        &'life0 mut self,
        model: EmbeddingModel,
        data: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = Result<EmbeddingsResult, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn url(&self) -> Url;
}

Required Methods§

Source

fn infer<'life0, 'async_trait>( &'life0 mut self, model: InferencingModel, prompt: String, params: InferencingParams, ) -> Pin<Box<dyn Future<Output = Result<InferencingResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn generate_embeddings<'life0, 'async_trait>( &'life0 mut self, model: EmbeddingModel, data: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<EmbeddingsResult, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn url(&self) -> Url

Implementors§