Crig::StreamingChat(M)
Inherits Crig::StreamingPrompt
Trait for high-level streaming chat interface with conversation history.
This trait provides an interface for streaming chat completions with support for maintaining conversation history. Implementations can optionally support prompt hooks for observing and controlling the agent's execution lifecycle.
Instance methods
stream_chat(prompt : Crig::Completion::Message | String, chat_history : Array(Crig::Completion::Message)) : Crig::StreamingPromptRequest(M)
Stream a chat with history to the model
The updated history (including the new prompt and response) is returned
in PromptResponse#messages.