Skip to main content

Module session

Module session 

Source
Expand description

Realtime session — driver that normalises raw OpenAI events into vendor-neutral RealtimeEvent values and dispatches tool batches.

Compared to the Python and TypeScript ports, the Rust session is consumed via two channels:

  • events_rx: vendor-neutral RealtimeEvent stream
  • audio_rx: decoded PCM frames (also surfaced as AssistantAudioDelta events for completeness)

Callers spawn the session via RealtimeSession::run, which takes the gateway session and returns the channels; the run task pumps the gateway until close. This mirrors the broker → session orchestration in the other ports while staying idiomatic Rust async.

Structs§

RealtimeSession
Outbound handle returned by RealtimeSession::run.

Functions§

build_session_update
Build the vendor-specific session.update payload from a vendor-neutral config. Matches the OpenAI Realtime GA shape.