Gemini Live's wire format: the frames sent to it and the events its frames decode to. Pure, so it's tested without a socket.
Copied from Subvocal, with session resumption and audioStreamEnd added.
Summary
Functions
Tells the model the audio stopped for a while, so it doesn't wait for more.
The model as the API names it, "models/...". Takes a bare name or a
gemini: or google: prefix; nil is the default.
The setup frame, the first thing sent on a connection. Options: :model
(needed), :voice, :response_modalities, :system_instruction, :tools (Gemini
declarations), :resumption_handle (from a {:resumption, handle}
event, to carry on the same session on a new connection),
:context_window_compression (false to disable, or [trigger_tokens: ..., target_tokens: ...]),
:input_audio_transcription (default true), and :output_audio_transcription (default true).
Functions
Tells the model the audio stopped for a while, so it doesn't wait for more.
The model as the API names it, "models/...". Takes a bare name or a
gemini: or google: prefix; nil is the default.
The setup frame, the first thing sent on a connection. Options: :model
(needed), :voice, :response_modalities, :system_instruction, :tools (Gemini
declarations), :resumption_handle (from a {:resumption, handle}
event, to carry on the same session on a new connection),
:context_window_compression (false to disable, or [trigger_tokens: ..., target_tokens: ...]),
:input_audio_transcription (default true), and :output_audio_transcription (default true).