Trait AsyncStreamedChatClient

Source
pub trait AsyncStreamedChatClient {
    type ErrorType: Error;
    type Item: ChatCompletionStream;

    // Required method
    fn invoke_stream(
        &self,
        prompt_messages: Vec<PromptMessage>,
    ) -> impl Future<Output = Result<Self::Item, Self::ErrorType>> + Send;
}
Expand description

§AsyncStreamedChatClient

Trait for any client that generates streamed chat completions asynchronously

Required Associated Types§

Required Methods§

Source

fn invoke_stream( &self, prompt_messages: Vec<PromptMessage>, ) -> impl Future<Output = Result<Self::Item, Self::ErrorType>> + Send

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.

Implementors§