Class ThinkingConfig.Builder

java.lang.Object
com.google.genai.types.ThinkingConfig.Builder
Enclosing class:
ThinkingConfig

public abstract static class ThinkingConfig.Builder extends Object
Builder for ThinkingConfig.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • includeThoughts

      public abstract ThinkingConfig.Builder includeThoughts(boolean includeThoughts)
      Setter for includeThoughts.

      includeThoughts: Indicates whether to include thoughts in the response. If true, thoughts are returned only if the model supports thought and thoughts are available.

    • clearIncludeThoughts

      @CanIgnoreReturnValue public ThinkingConfig.Builder clearIncludeThoughts()
      Clears the value of includeThoughts field.
    • thinkingBudget

      public abstract ThinkingConfig.Builder thinkingBudget(Integer thinkingBudget)
      Setter for thinkingBudget.

      thinkingBudget: Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values and allowed ranges are model dependent.

    • clearThinkingBudget

      @CanIgnoreReturnValue public ThinkingConfig.Builder clearThinkingBudget()
      Clears the value of thinkingBudget field.
    • thinkingLevel

      public abstract ThinkingConfig.Builder thinkingLevel(ThinkingLevel thinkingLevel)
      Setter for thinkingLevel.

      thinkingLevel: Optional. The level of thoughts tokens that the model should generate.

    • clearThinkingLevel

      @CanIgnoreReturnValue public ThinkingConfig.Builder clearThinkingLevel()
      Clears the value of thinkingLevel field.
    • thinkingLevel

      @CanIgnoreReturnValue public ThinkingConfig.Builder thinkingLevel(ThinkingLevel.Known knownType)
      Setter for thinkingLevel given a known enum.

      thinkingLevel: Optional. The level of thoughts tokens that the model should generate.

    • thinkingLevel

      @CanIgnoreReturnValue public ThinkingConfig.Builder thinkingLevel(String thinkingLevel)
      Setter for thinkingLevel given a string.

      thinkingLevel: Optional. The level of thoughts tokens that the model should generate.

    • build

      public abstract ThinkingConfig build()