pub trait LLMProvider: Send + Sync {
// Required method
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
messages: &'life1 [Message],
tools: &'life2 [ToolDefinition],
) -> Pin<Box<dyn Future<Output = Result<LLMResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
LLM provider trait for making API calls
Required Methods§
Sourcefn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
messages: &'life1 [Message],
tools: &'life2 [ToolDefinition],
) -> Pin<Box<dyn Future<Output = Result<LLMResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
messages: &'life1 [Message],
tools: &'life2 [ToolDefinition],
) -> Pin<Box<dyn Future<Output = Result<LLMResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Call the LLM with messages and available tools, returning the assistant’s response