pub trait LLMClient: Send + Sync {
// Required method
fn complete<'life0, 'life1, 'life2, 'async_trait, T, C>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSpec],
) -> Pin<Box<dyn Future<Output = Result<T, String>> + Send + 'async_trait>>
where T: LLMResponseTrait<C> + Default + Send + 'async_trait,
C: for<'de> Deserialize<'de> + Default + Send + Serialize + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
Sourcefn complete<'life0, 'life1, 'life2, 'async_trait, T, C>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSpec],
) -> Pin<Box<dyn Future<Output = Result<T, String>> + Send + 'async_trait>>where
T: LLMResponseTrait<C> + Default + Send + 'async_trait,
C: for<'de> Deserialize<'de> + Default + Send + Serialize + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'async_trait, T, C>(
&'life0 self,
messages: &'life1 [Message],
tools: &'life2 [ToolSpec],
) -> Pin<Box<dyn Future<Output = Result<T, String>> + Send + 'async_trait>>where
T: LLMResponseTrait<C> + Default + Send + 'async_trait,
C: for<'de> Deserialize<'de> + Default + Send + Serialize + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send messages to LLM and get a response
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.