pub trait AsyncClient: Send + Sync {
// Required methods
fn chat_completion<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
) -> Pin<Box<dyn Future<Output = RsllmResult<ChatResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn chat_completion_stream<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
) -> Pin<Box<dyn Future<Output = RsllmResult<ChatStream>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RsllmResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Async client trait for custom implementations
Required Methods§
Sourcefn chat_completion<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
) -> Pin<Box<dyn Future<Output = RsllmResult<ChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chat_completion<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
) -> Pin<Box<dyn Future<Output = RsllmResult<ChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Chat completion
Sourcefn chat_completion_stream<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
) -> Pin<Box<dyn Future<Output = RsllmResult<ChatStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chat_completion_stream<'life0, 'async_trait>(
&'life0 self,
messages: Vec<ChatMessage>,
) -> Pin<Box<dyn Future<Output = RsllmResult<ChatStream>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Chat completion streaming
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RsllmResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RsllmResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check