Skip to content

Commit ecfadfe

Browse files
BenjaminKazemicopybara-github
authored andcommitted
feat: Add minimal and medium thinking levels.
PiperOrigin-RevId: 845014005
1 parent 7c9b7f6 commit ecfadfe

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

src/main/java/com/google/genai/types/ThinkingConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public abstract class ThinkingConfig extends JsonSerializable {
4444
@JsonProperty("thinkingBudget")
4545
public abstract Optional<Integer> thinkingBudget();
4646

47-
/** Optional. The level of thoughts tokens that the model should generate. */
47+
/** Optional. The number of thoughts tokens that the model should generate. */
4848
@JsonProperty("thinkingLevel")
4949
public abstract Optional<ThinkingLevel> thinkingLevel();
5050

@@ -107,7 +107,7 @@ public Builder clearThinkingBudget() {
107107
/**
108108
* Setter for thinkingLevel.
109109
*
110-
* <p>thinkingLevel: Optional. The level of thoughts tokens that the model should generate.
110+
* <p>thinkingLevel: Optional. The number of thoughts tokens that the model should generate.
111111
*/
112112
@JsonProperty("thinkingLevel")
113113
public abstract Builder thinkingLevel(ThinkingLevel thinkingLevel);
@@ -125,7 +125,7 @@ public Builder clearThinkingLevel() {
125125
/**
126126
* Setter for thinkingLevel given a known enum.
127127
*
128-
* <p>thinkingLevel: Optional. The level of thoughts tokens that the model should generate.
128+
* <p>thinkingLevel: Optional. The number of thoughts tokens that the model should generate.
129129
*/
130130
@CanIgnoreReturnValue
131131
public Builder thinkingLevel(ThinkingLevel.Known knownType) {
@@ -135,7 +135,7 @@ public Builder thinkingLevel(ThinkingLevel.Known knownType) {
135135
/**
136136
* Setter for thinkingLevel given a string.
137137
*
138-
* <p>thinkingLevel: Optional. The level of thoughts tokens that the model should generate.
138+
* <p>thinkingLevel: Optional. The number of thoughts tokens that the model should generate.
139139
*/
140140
@CanIgnoreReturnValue
141141
public Builder thinkingLevel(String thinkingLevel) {

src/main/java/com/google/genai/types/ThinkingLevel.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,25 @@
2323
import com.google.common.base.Ascii;
2424
import java.util.Objects;
2525

26-
/** The level of thoughts tokens that the model should generate. */
26+
/** The number of thoughts tokens that the model should generate. */
2727
public class ThinkingLevel {
2828

2929
/** Enum representing the known values for ThinkingLevel. */
3030
public enum Known {
31-
/** Default value. */
31+
/** Unspecified thinking level. */
3232
THINKING_LEVEL_UNSPECIFIED,
3333

3434
/** Low thinking level. */
3535
LOW,
3636

37+
/** Medium thinking level. */
38+
MEDIUM,
39+
3740
/** High thinking level. */
38-
HIGH
41+
HIGH,
42+
43+
/** MINIMAL thinking level. */
44+
MINIMAL
3945
}
4046

4147
private Known thinkingLevelEnum;

0 commit comments

Comments
 (0)