Package com.google.genai.types
Class ThinkingConfig
-
- All Implemented Interfaces:
public abstract class ThinkingConfig extends JsonSerializable
The thinking features configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classThinkingConfig.BuilderBuilder for ThinkingConfig.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ThinkingConfig()
-
Method Summary
Modifier and Type Method Description abstract Optional<Boolean>includeThoughts()Indicates whether to include thoughts in the response. abstract Optional<Integer>thinkingBudget()Indicates the thinking budget in tokens. abstract Optional<ThinkingLevel>thinkingLevel()Optional. static ThinkingConfig.Builderbuilder()Instantiates a builder for ThinkingConfig. abstract ThinkingConfig.BuildertoBuilder()Creates a builder with the same values as this instance. static ThinkingConfigfromJson(String jsonString)Deserializes a JSON string to a ThinkingConfig object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
includeThoughts
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
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.
-
thinkingLevel
abstract Optional<ThinkingLevel> thinkingLevel()
Optional. The number of thoughts tokens that the model should generate.
-
builder
static ThinkingConfig.Builder builder()
Instantiates a builder for ThinkingConfig.
-
toBuilder
abstract ThinkingConfig.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ThinkingConfig fromJson(String jsonString)
Deserializes a JSON string to a ThinkingConfig object.
-
-
-
-