Skip to main content

Module chat

Module chat 

Source

Structsยง

ChatMessage
A single message in a conversation.
ChatRequest
Request body for text generation.
ChatResponse
Response from a non-streaming chat request.
ChatStream
An async stream of StreamEvents from an SSE chat response.
ChatTool
Defines a function the model can call.
ChatUsage
Token counts and cost for a chat response.
Citation
A source reference from web search grounding.
ContentBlock
A single block in the response content array.
EstimateResponse
Response shape from POST /qai/v1/chat/estimate. Returned by Client::estimate_chat.
StreamDelta
Incremental text in a streaming event.
StreamEvent
A single event from an SSE chat stream.
StreamToolUse
A tool call from a legacy (atomic) streaming event.
StreamToolUseComplete
Tool-call completion event โ€” fires exactly once per call with the server-accumulated, fully-parsed arguments.
StreamToolUseInputDelta
Tool-call input delta โ€” fires zero or more times with raw JSON fragments.
StreamToolUseStart
Tool-call start event โ€” fires once before any input deltas.