Skip to content

Commit 7dc9e12

Browse files
yifengloulangfun authors
authored and
langfun authors
committed
Set includeThoughts to True by default for Gemini API.
PiperOrigin-RevId: 766939527
1 parent cf1007c commit 7dc9e12

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

langfun/core/llms/gemini.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,8 @@ def _generation_config(
695695
)
696696
if options.max_thinking_tokens is not None:
697697
config['thinkingConfig'] = {
698-
'thinkingBudget': options.max_thinking_tokens
698+
'includeThoughts': True,
699+
'thinkingBudget': options.max_thinking_tokens,
699700
}
700701

701702
return config

langfun/core/llms/gemini_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_generation_config(self):
173173
responseLogprobs=False,
174174
logprobs=None,
175175
seed=None,
176-
thinkingConfig={'thinkingBudget': 100},
176+
thinkingConfig={'includeThoughts': True, 'thinkingBudget': 100},
177177
),
178178
)
179179

0 commit comments

Comments
 (0)