Skip to main content

ModelCaller

Trait ModelCaller 

Source
pub trait ModelCaller: Send + Sync {
    // Required method
    fn call<'life0, 'life1, 'async_trait>(
        &'life0 self,
        model: &'life1 ModelId,
        messages: Vec<Message>,
        system_context: Option<SystemContext>,
        cancel_token: CancellationToken,
    ) -> Pin<Box<dyn Future<Output = Result<Message, ModelCallError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn call<'life0, 'life1, 'async_trait>( &'life0 self, model: &'life1 ModelId, messages: Vec<Message>, system_context: Option<SystemContext>, cancel_token: CancellationToken, ) -> Pin<Box<dyn Future<Output = Result<Message, ModelCallError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§