StreamingChat

Trait StreamingChat 

Source
pub trait StreamingChat<M, R>: Send + Sync{
    // Required method
    fn stream_chat(
        &self,
        prompt: impl Into<Message> + Send,
        chat_history: Vec<Message>,
    ) -> StreamingPromptRequest<M, ()>;
}
Expand description

Trait for high-level streaming chat interface

Required Methods§

Source

fn stream_chat( &self, prompt: impl Into<Message> + Send, chat_history: Vec<Message>, ) -> StreamingPromptRequest<M, ()>

Stream a chat with history to the model

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§