File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
firebase-ai/src/main/kotlin/com/google/firebase/ai/type Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,18 @@ import kotlinx.serialization.Serializable
2323public class ThinkingConfig
2424private constructor (
2525 internal val thinkingBudget: Int? = null ,
26+ internal val includeThoughts: Boolean? = null
2627) {
2728
2829 public class Builder () {
2930 @JvmField
3031 @set:JvmSynthetic // hide void setter from Java
3132 public var thinkingBudget: Int? = null
3233
34+ @JvmField
35+ @set:JvmSynthetic // hide void setter from Java
36+ public var includeThoughts: Boolean? = null
37+
3338 /* *
3439 * Indicates the thinking budget in tokens. `0` is disabled. `-1` is dynamic. The default values
3540 * and allowed ranges are model dependent.
@@ -38,13 +43,20 @@ private constructor(
3843 this .thinkingBudget = thinkingBudget
3944 }
4045
46+ public fun setIncludeThoughts (includeThoughts : Boolean ): Builder = apply {
47+ this .includeThoughts = includeThoughts
48+ }
49+
4150 public fun build (): ThinkingConfig = ThinkingConfig (thinkingBudget = thinkingBudget)
4251 }
4352
44- internal fun toInternal () = Internal (thinkingBudget)
53+ internal fun toInternal () = Internal (thinkingBudget, includeThoughts )
4554
4655 @Serializable
47- internal data class Internal (@SerialName(" thinking_budget" ) val thinkingBudget : Int? )
56+ internal data class Internal (
57+ @SerialName(" thinking_budget" ) val thinkingBudget : Int? = null ,
58+ val includeThoughts : Boolean? = null
59+ )
4860}
4961
5062/* *
You can’t perform that action at this time.
0 commit comments