Class LiveClientContent

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.LiveClientContent

public abstract class LiveClientContent extends JsonSerializable
Incremental update of the current conversation delivered from the client.

All the content here will unconditionally be appended to the conversation history and used as part of the prompt to the model to generate content.

A message here will interrupt any current model generation.

  • Constructor Details

    • LiveClientContent

      public LiveClientContent()
  • Method Details

    • turns

      public abstract Optional<List<Content>> turns()
      The content appended to the current conversation with the model.

      For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history and latest request.

    • turnComplete

      public abstract Optional<Boolean> turnComplete()
      If true, indicates that the server content generation should start with the currently accumulated prompt. Otherwise, the server will await additional messages before starting generation.
    • builder

      public static LiveClientContent.Builder builder()
      Instantiates a builder for LiveClientContent.
    • toBuilder

      public abstract LiveClientContent.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static LiveClientContent fromJson(String jsonString)
      Deserializes a JSON string to a LiveClientContent object.