Expand description
Realtime (WebSocket) sessions.
A RealtimeSession connects to a provider’s realtime endpoint through
the provider’s RealtimeModel: the model
issues the client secret, describes the WebSocket handshake and
translates between wire messages and the standardized
RealtimeClientEvent / RealtimeServerEvent sets. The session owns
the connection, forwards server events as a stream, and executes local
function tools when the model calls them.
Design: docs/01-architecture/11-other-modalities.md §9.
Structs§
- Client
Secret - A client secret for opening a session.
- Realtime
Handle - Sends events into a realtime session and closes it.
- Realtime
Session - An open realtime session.
- Realtime
Session Builder - Configuration of a realtime session before it connects.
- Realtime
Session Config - Session configuration.
- Realtime
Tool Definition - A function tool exposed in a realtime session.
- Response
Create Options - Options of a
response-createevent. - Transcription
Config - Transcription settings for input or output audio.
- Turn
Detection - Turn detection settings.
Enums§
- Conversation
Item - A conversation item created by the client, tagged by
type. - Conversation
Role - Role of a conversation item created by the client.
- Modality
- Output modality.
- Realtime
Client Event - Events sent by the client, tagged by
type. - Realtime
Server Event - Events received from the server, tagged by
type. - Turn
Detection Kind - Turn detection mode.
Functions§
- realtime_
session - Starts building a realtime session with
model. - realtime_
tool_ definitions - Converts a tool set into realtime tool definitions.
Type Aliases§
- Realtime
Event - Items of the event stream: standardized server events, or local failures (transport errors, unparsable messages, tool execution errors).