pub trait LlmClient:
Send
+ Sync
+ Debug {
// Required methods
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = Result<CompletionResult, LlmError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn model_id(&self) -> &str;
}Expand description
Shared interface for LLM clients.
Required Methods§
Sourcefn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = Result<CompletionResult, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
prompt: &'life1 str,
max_tokens: u32,
) -> Pin<Box<dyn Future<Output = Result<CompletionResult, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run a single non-streaming completion.