Skip to main content

LLMClient

Trait LLMClient 

Source
pub trait LLMClient: Send + Sync {
    // Required method
    fn execute_request<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        request: &'life1 ModelRequest,
        provider: &'life2 LLMProvider,
    ) -> Pin<Box<dyn Future<Output = Result<ModelResponse, RoutingError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for LLM clients

Required Methods§

Source

fn execute_request<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, request: &'life1 ModelRequest, provider: &'life2 LLMProvider, ) -> Pin<Box<dyn Future<Output = Result<ModelResponse, RoutingError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§