pub trait StreamingChat<M, R>: WasmCompatSend + WasmCompatSyncwhere
M: CompletionModel + 'static,
M::StreamingResponse: WasmCompatSend,
R: Clone + Unpin + GetTokenUsage,{
// 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§
Sourcefn stream_chat<I, T>(
&self,
prompt: impl Into<Message> + WasmCompatSend,
chat_history: I,
) -> StreamingPromptRequest<M>
fn stream_chat<I, T>( &self, prompt: impl Into<Message> + WasmCompatSend, chat_history: I, ) -> StreamingPromptRequest<M>
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".