Trait AsyncChatClient

Source
pub trait AsyncChatClient {
    type ErrorType: Error;

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

§AsyncChatClient

Trait for any client that generates chat completions asynchronously

Required Associated Types§

Required Methods§

Source

fn invoke( &self, prompt_messages: Vec<PromptMessage>, ) -> impl Future<Output = Result<PromptMessage, 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§