Trait LlmProvider
Source pub trait LlmProvider: Send + Sync {
// Required methods
fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 LlmConfig,
history: &'life2 [ChatMessage],
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn call_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 LlmConfig,
history: &'life2 [ChatMessage],
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<LlmStreamEvent>> + Send>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}