Skip to main content

StreamingChat

Trait StreamingChat 

Source
pub trait StreamingChat<M, R>: WasmCompatSend + WasmCompatSync{
    // Required method
    fn stream_chat<I, T>(
        &self,
        prompt: impl Into<Message> + WasmCompatSend,
        chat_history: I,
    ) -> StreamingPromptRequest<M>
       where I: IntoIterator<Item = T> + WasmCompatSend,
             T: Into<Message>;
}
Expand description

High-level streaming chat interface with caller-provided history.

Required Methods§

Source

fn stream_chat<I, T>( &self, prompt: impl Into<Message> + WasmCompatSend, chat_history: I, ) -> StreamingPromptRequest<M>
where I: IntoIterator<Item = T> + WasmCompatSend, T: Into<Message>,

Create a classic streaming request with canonical chat history.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§