Trait llm_api_access::Access

source ·
pub trait Access {
    // Required methods
    fn send_single_message<'life0, 'async_trait>(
        &'life0 self,
        messages: Vec<Message>
    ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_convo_message<'life0, 'async_trait>(
        &'life0 self,
        messages: Vec<Content>
    ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_model_info<'life0, 'life1, 'async_trait>(
        &'life0 self,
        model: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<ModelInfo, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn list_models<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelInfo>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn count_tokens<'life0, 'life1, 'async_trait>(
        &'life0 self,
        text: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<u32, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

source

fn send_single_message<'life0, 'async_trait>( &'life0 self, messages: Vec<Message> ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_convo_message<'life0, 'async_trait>( &'life0 self, messages: Vec<Content> ) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_model_info<'life0, 'life1, 'async_trait>( &'life0 self, model: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<ModelInfo, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn list_models<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<ModelInfo>, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn count_tokens<'life0, 'life1, 'async_trait>( &'life0 self, text: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<u32, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§