Server content message for Live API sessions.
Incremental server update generated by the model in response to client messages. Content is generated as quickly as possible, not in real time. Clients may choose to buffer and play it out in real time.
Fields
model_turn- Content generated by the model as part of the conversationgeneration_complete- True if the model is done generatingturn_complete- True if the model has completed its turninterrupted- True if a client message interrupted model generationgrounding_metadata- Grounding metadata for the generated contentinput_transcription- Transcription of input audiooutput_transcription- Transcription of model's audio outputurl_context_metadata- Metadata from URL context retrieval
Example
%ServerContent{
model_turn: %{role: "model", parts: [%{text: "Hello!"}]},
turn_complete: true
}
Summary
Functions
Extracts text from the model turn.
Parses from API response.
Creates a new ServerContent.
Converts to API format (camelCase).
Types
@type t() :: %Gemini.Types.Live.ServerContent{ generation_complete: boolean() | nil, grounding_metadata: Gemini.Types.Live.GroundingMetadata.t() | nil, input_transcription: Gemini.Types.Live.Transcription.t() | nil, interrupted: boolean() | nil, model_turn: content() | nil, output_transcription: Gemini.Types.Live.Transcription.t() | nil, turn_complete: boolean() | nil, url_context_metadata: url_context_metadata() | nil }
@type url_context_metadata() :: %{optional(:url_metadata) => [map()]}
Functions
Extracts text from the model turn.
Parses from API response.
Creates a new ServerContent.
Converts to API format (camelCase).