LiveServerContent

@PublicPreviewAPI
public final classLiveServerContent implementsLiveServerMessage


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

Content is generated as quickly as possible, and not in realtime. You may choose to buffer and play it out in realtime.

Summary

Public fields

finalContent

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

final boolean

The model has finishedgenerating data for the current turn.

finalTranscription

The input transcription.

final boolean

The model was interrupted by the client while generating data.

finalTranscription

The output transcription.

final boolean

The model has finished sending data in the current turn.

Public constructors

LiveServerContent(
    Content content,
    boolean interrupted,
    boolean turnComplete,
    boolean generationComplete,
    Transcription inputTranscription,
    Transcription outputTranscription
)

This method is deprecated. This class should not be constructed, only received from the Server

Public fields

content

public final Content content

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

This can benull if there is no content.

generationComplete

public final boolean generationComplete

The model has finishedgenerating data for the current turn.

For realtime playback, there will be a delay between when the model finishes generating content and the client has finished playing back the generated content.generationComplete indicates that the model is done generating data, whileturnComplete indicates the model is waiting for additional client messages. Sending a message during this delay may cause aninterrupted message to be sent.

Note that if the model wasinterrupted, this will not be set. The model will go frominterrupted ->turnComplete.

inputTranscription

public final Transcription inputTranscription

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

interrupted

public final boolean interrupted

The model was interrupted by the client while generating data.

An interruption occurs when the client sends a message while the model is actively sending data.

outputTranscription

public final Transcription outputTranscription

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

turnComplete

public final boolean turnComplete

The model has finished sending data in the current turn.

Generation will only start in response to additional client messages.

Can be set alongsidecontent, indicating that thecontent is the last in the turn.

Public constructors

LiveServerContent

public LiveServerContent(
    Content content,
    boolean interrupted,
    boolean turnComplete,
    boolean generationComplete,
    Transcription inputTranscription,
    Transcription outputTranscription
)
This method is deprecated.
This class should not be constructed, only received from the Server

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-12 UTC.