Class ThinkingConfig

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

public abstract class ThinkingConfig extends JsonSerializable
The thinking features configuration.
  • Constructor Details

    • ThinkingConfig

      public ThinkingConfig()
  • Method Details

    • includeThoughts

      public abstract Optional<Boolean> includeThoughts()
      Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.
    • thinkingBudget

      public abstract Optional<Integer> thinkingBudget()
      Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values and allowed ranges are model dependent.
    • builder

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

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

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