File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
firebase-ai/src/main/kotlin/com/google/firebase/ai/type Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,8 @@ private constructor(
5353 * depends on the model.
5454 */
5555 public fun setThinkingBudget (thinkingBudget : Int ): Builder = apply {
56- assert (thinkingLevel == null ) { " Cannot set both `thinkingBudget` and `thinkingLevel`" }
56+ if (thinkingLevel != null )
57+ throw IllegalArgumentException (" Cannot set both `thinkingBudget` and `thinkingLevel`" )
5758 this .thinkingBudget = thinkingBudget
5859 }
5960
@@ -71,7 +72,8 @@ private constructor(
7172
7273 /* * Indicates the thinking budget based in Levels. */
7374 public fun setThinkingLevel (thinkingLevel : ThinkingLevel ): Builder = apply {
74- assert (thinkingBudget == null ) { " Cannot set both `thinkingBudget` and `thinkingLevel`" }
75+ if (thinkingBudget != null )
76+ throw IllegalArgumentException (" Cannot set both `thinkingBudget` and `thinkingLevel`" )
7577 this .thinkingLevel = thinkingLevel
7678 }
7779
You can’t perform that action at this time.
0 commit comments