Class LiveClientContextUpdate

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

public abstract class LiveClientContextUpdate extends JsonSerializable
Updates to the context of the current session.

Only fields that are set will be updated. Updates are guaranteed to be processed *in order* with the rest of the inputs.

  • Constructor Details

    • LiveClientContextUpdate

      public LiveClientContextUpdate()
  • Method Details

    • systemInstruction

      public abstract Optional<Content> systemInstruction()
      Updated system instruction for the model. If set, overrides `BidiGenerateContentSetup.system_instruction`. The system instructions are part of the model preamble, so updating them invalidates the prefix cache. Clients should only update this field when strictly necessary as it might have a performance impact on the model generation.
    • tools

      public abstract Optional<LiveClientContextUpdateTools> tools()
      An updated list of tools the model may use to generate the subsequent responses. If set, this list replaces the previously provided tools. The tools are part of the model preamble, so updating them invalidates the prefix cache. Clients should only update this field when strictly necessary as it might have a performance impact on the model generation.
    • builder

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

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

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