LiveServerContent

@Serializable
data class LiveServerContent(val modelTurn: Content? = null, val turnComplete: Boolean? = null, val interrupted: Boolean? = null, val groundingMetadata: GroundingMetadata? = null, val generationComplete: Boolean? = null, val inputTranscription: Transcription? = null, val outputTranscription: Transcription? = null, val urlContextMetadata: UrlContextMetadata? = null, val turnCompleteReason: TurnCompleteReason? = null, val waitingForInput: Boolean? = null, val interimInputTranscription: Transcription? = null)

Incremental server update generated by the model in response to client messages.

Content is generated as quickly as possible, and not in real time. Clients may choose to buffer and play it out in real time.

Constructors

Link copied to clipboard
constructor(modelTurn: Content? = null, turnComplete: Boolean? = null, interrupted: Boolean? = null, groundingMetadata: GroundingMetadata? = null, generationComplete: Boolean? = null, inputTranscription: Transcription? = null, outputTranscription: Transcription? = null, urlContextMetadata: UrlContextMetadata? = null, turnCompleteReason: TurnCompleteReason? = null, waitingForInput: Boolean? = null, interimInputTranscription: Transcription? = null)

Properties

Link copied to clipboard

If true, indicates that the model is done generating. When model is interrupted while generating there will be no generation_complete message in interrupted turn, it will go through interrupted turn_complete. When model assumes realtime playback there will be delay between generation_complete and turn_complete that is caused by model waiting for playback to finish. If true, indicates that the model has finished generating all content. This is a signal to the client that it can stop sending messages.

Link copied to clipboard

Metadata returned to client when grounding is enabled.

Link copied to clipboard

Input transcription. The transcription is independent to the model turn which means it doesn’t imply any ordering between transcription and model turn.

Link copied to clipboard

Low latency transcription updated while the user is speaking.

Link copied to clipboard
val interrupted: Boolean? = null

If true, indicates that a client message has interrupted current model generation. If the client is playing out the content in realtime, this is a good signal to stop and empty the current queue.

Link copied to clipboard
val modelTurn: Content? = null

The content that the model has generated as part of the current conversation with the user.

Link copied to clipboard

Output transcription. The transcription is independent to the model turn which means it doesn’t imply any ordering between transcription and model turn.

Link copied to clipboard
val turnComplete: Boolean? = null

If true, indicates that the model is done generating. Generation will only start in response to additional client messages. Can be set alongside content, indicating that the content is the last in the turn.

Link copied to clipboard

Reason for the turn is complete.

Link copied to clipboard

Metadata related to url context retrieval tool.

Link copied to clipboard

If true, indicates that the model is not generating content because it is waiting for more input from the user, e.g. because it expects the user to continue talking.