Terminates the underlying connection.
Appends client content to the conversation: the initial context and context notes (turnComplete: false), or a
bare turnComplete: true that closes the turn a note left open.
Streams realtime user input to the model — media frames (audio now) AND mid-session text. Realtime text is the Live API's "respond now" path for in-conversation messages: native-audio models treat sendClientContent as history seeding only and will NOT generate from it mid-call, while realtime text triggers immediately.
OptionalactivityEnd?: ActivityEndOptionalactivityStart?: ActivityStartManual activity markers — used in MEETING mode (automatic activity detection disabled).
Optionalaudio?: Blob_2Optionalmedia?: Blob_2Optionaltext?: stringOptionalvideo?: Blob_2One video frame: an encoded image (JPEG or PNG).
Replies to a server tool call with one or more function responses.
The minimal subset of
@google/genai'sSessionthat the realtime driver depends on. Declaring the seam as an interface (rather than the concrete SDKSession) lets unit tests inject a fully in-memory fake that drives the registered callbacks with Gemini-shaped messages and captures outbound calls — no websocket, no network.