File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed
src/main/kotlin/com/google/firebase/ai/type Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 11# Unreleased
2- * [ feat] Added support for setting thinking budget for the Gemini models that support it. (#6990 )
2+ * [ feature] Added support for configuring the "thinking" budget when using Gemini
3+ 2.5 series models. (#6990 )
34
45# 16.2.0
56* [ changed] Deprecate the ` totalBillableCharacters ` field (only usable with pre-2.0 models). (#7042 )
Original file line number Diff line number Diff line change @@ -936,15 +936,12 @@ package com.google.firebase.ai.type {
936936 }
937937
938938 public final class ThinkingConfig {
939- ctor public ThinkingConfig(Integer? thinkingBudget);
940- method public Integer? getThinkingBudget();
941- property public final Integer? thinkingBudget;
942939 }
943940
944941 public static final class ThinkingConfig.Builder {
945942 ctor public ThinkingConfig.Builder();
946943 method public com.google.firebase.ai.type.ThinkingConfig build();
947- method public com.google.firebase.ai.type.ThinkingConfig.Builder setThinkingBudget(Integer? thinkingBudget);
944+ method public com.google.firebase.ai.type.ThinkingConfig.Builder setThinkingBudget(int thinkingBudget);
948945 field public Integer? thinkingBudget;
949946 }
950947
Original file line number Diff line number Diff line change @@ -20,13 +20,21 @@ import kotlinx.serialization.SerialName
2020import kotlinx.serialization.Serializable
2121
2222/* * Configuration parameters for thinking features. */
23- public class ThinkingConfig (public val thinkingBudget : Int? ) {
23+ public class ThinkingConfig
24+ private constructor (
25+ internal val thinkingBudget: Int? = null ,
26+ ) {
2427
2528 public class Builder () {
26- @JvmField public var thinkingBudget: Int? = null
29+ @JvmField
30+ @set:JvmSynthetic // hide void setter from Java
31+ public var thinkingBudget: Int? = null
2732
28- /* * The number of thoughts tokens that the model should generate. */
29- public fun setThinkingBudget (thinkingBudget : Int? ): Builder = apply {
33+ /* *
34+ * Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values
35+ * and allowed ranges are model dependent.
36+ */
37+ public fun setThinkingBudget (thinkingBudget : Int ): Builder = apply {
3038 this .thinkingBudget = thinkingBudget
3139 }
3240
You can’t perform that action at this time.
0 commit comments