Class SessionResumptionConfig

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

public abstract class SessionResumptionConfig extends JsonSerializable
Configuration of session resumption mechanism.

Included in `LiveConnectConfig.session_resumption`. If included server will send `LiveServerSessionResumptionUpdate` messages.

  • Constructor Details

    • SessionResumptionConfig

      public SessionResumptionConfig()
  • Method Details

    • handle

      public abstract Optional<String> handle()
      Session resumption handle of previous session (session to restore).

      If not present new session will be started.

    • transparent

      public abstract Optional<Boolean> transparent()
      If set the server will send `last_consumed_client_message_index` in the `session_resumption_update` messages to allow for transparent reconnections.
    • builder

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

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

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