Expand description
Server → Client message types and the semantic ServerEvent enum.
A single wire message (ServerMessage) is a flat struct where multiple
fields may be present simultaneously (e.g. serverContent +
usageMetadata). The codec::into_events
function decomposes it into a sequence of ServerEvents — the
application-facing abstraction.
Structs§
- ApiError
- An error returned by the API.
- Function
Call Request - A function the server wants the client to execute.
- GoAway
- Sent when the server is about to terminate the connection. The client should reconnect (with a session resumption handle if available).
- Modality
Token Count - Server
Content - Model output and associated metadata within a single wire message.
- Server
Message - Raw server message as received on the wire.
- Session
Resumption Update - Periodic update with a fresh session resumption handle.
- Tool
Call Cancellation - Tool
Call Message - Transcription
- Partial audio-transcription update from the server.
- Usage
Metadata - Token usage statistics. Accompanies many server messages.
Enums§
- Server
Event - High-level event produced by decomposing a
ServerMessage.