Skip to content

Commit cf3898e

Browse files
committed
docs: add Gemini thinking mode documentation and configuration settings
1 parent 3735c0f commit cf3898e

File tree

5 files changed

+153
-0
lines changed

5 files changed

+153
-0
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export default defineConfig({
5656
text: 'Google (Gemini)',
5757
link: '/google-configuration',
5858
items: [
59+
{ text: 'Thinking Mode', link: '/gemini-thinking-mode' },
5960
{ text: 'Image Generation', link: '/gemini-image-generation' }
6061
]
6162
},

docs/gemini-thinking-mode.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Gemini Thinking Mode
2+
3+
This guide explains how to use and customize Gemini's Thinking Mode in BotGem. Thinking Mode is enabled by default for Gemini 2.5 series models, allowing them to perform more complex reasoning and solve challenging tasks.
4+
5+
## How to Customize Thinking Mode for Gemini 2.5 Models
6+
7+
> **Note**: Thinking is enabled by default for the Gemini 2.5 series models. The following configuration allows you to customize the thinking behavior and make it visible in responses.
8+
>
9+
> Thought summaries offer insights into the model's internal reasoning process. This feature can be valuable for verifying the model's approach and keeping users informed during longer tasks, especially when combined with streaming.
10+
11+
![Gemini 2.5 Thinking Mode Settings Interface](/gemini-thinking-dark.png){.dark-only}
12+
![Gemini 2.5 Thinking Mode Settings Interface](/gemini-thinking.png){.light-only}
13+
14+
You can enable thought summaries (make the thinking process visible) in the chat window by following these steps:
15+
16+
1. Click the **settings icon** in the top right corner of the chat window
17+
2. Find the **Parameters** input field in the settings panel
18+
3. Copy the following configuration into **Parameters**:
19+
20+
```json
21+
{
22+
"thinkingConfig": {
23+
"includeThoughts": true
24+
}
25+
}
26+
```
27+
28+
## Understanding Thinking Mode
29+
30+
Gemini Thinking Mode allows the model to engage in more detailed reasoning before providing a response. This feature is particularly useful for:
31+
32+
- Complex problem-solving
33+
- Multi-step reasoning tasks
34+
- Detailed analysis and planning
35+
- Code generation and debugging
36+
37+
While thinking is enabled by default for Gemini 2.5 series models, the `thinkingConfig` parameter with `includeThoughts` set to `true` allows you to see the model's reasoning process through thought summaries. These summaries offer insights into the model's internal reasoning, making the thinking visible in the response and giving you insight into how the model arrived at its conclusions.
38+
39+
Thought summaries are valuable for:
40+
- Verifying the model's approach to solving problems
41+
- Understanding the reasoning behind complex answers
42+
- Keeping users informed during longer tasks
43+
- Identifying where reasoning might have gone wrong
44+
45+
If you want to adjust the thinking process further, you can also set a thinking budget:
46+
47+
```json
48+
{
49+
"thinkingConfig": {
50+
"includeThoughts": true,
51+
"thinkingBudget": 16000
52+
}
53+
}
54+
```
55+
56+
The `thinkingBudget` parameter lets you guide the model on the number of thinking tokens it can use when generating a response:
57+
58+
- **Range**: Must be an integer from 0 to 24576 tokens
59+
- **Default**: If not specified, Gemini will dynamically adjust the budget based on the complexity of the request
60+
- **Disable thinking**: Setting the budget to 0 disables thinking completely
61+
- **Recommended for complex tasks**: 8000-16000 tokens
62+
- **Model support**: Note that `thinkingBudget` is only supported in Gemini 2.5 Flash
63+
64+
A higher token count generally allows for more detailed reasoning, which can be beneficial for tackling more complex tasks. Depending on the prompt, the model might overflow or underflow the token budget.
65+
66+
67+
68+
## Troubleshooting
69+
70+
If you encounter issues with Thinking Mode:
71+
72+
- Ensure your Google API key has access to Gemini 2.5 models
73+
- Verify that the parameters are correctly formatted in JSON
74+
- Try adjusting the thinking budget if responses are incomplete or not detailed enough
75+
- For very complex tasks, consider breaking them down into smaller steps
76+
77+
For more information about Google Gemini configuration, see the [Google AI Configuration Guide](google-configuration.md).
626 KB
Loading

docs/public/gemini-thinking.png

633 KB
Loading

docs/zh/gemini-thinking-mode.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Gemini 思考模式
2+
3+
本指南介绍如何在 BotGem 中使用和自定义 Gemini 的思考模式。思考模式在 Gemini 2.5 系列模型中默认启用,使其能够执行更复杂的推理并解决具有挑战性的任务。
4+
5+
## 如何自定义 Gemini 2.5 模型的思考模式
6+
7+
> **注意**:思考功能在 Gemini 2.5 系列模型中默认启用。以下配置允许您自定义思考行为并在响应中查看思考过程。
8+
>
9+
> 思考摘要能够让您洞察模型的内部推理过程。这一功能在验证模型的解题思路和让用户了解长时间任务的进展方面特别有价值,尤其是与流式输出结合使用时。
10+
11+
![Gemini 2.5 思考模式设置界面](/gemini-thinking-dark.png){.dark-only}
12+
![Gemini 2.5 思考模式设置界面](/gemini-thinking.png){.light-only}
13+
14+
您可以通过以下步骤在聊天窗口中启用思考摘要(使思考过程可见):
15+
16+
1. 点击聊天窗口右上角的**设置图标**
17+
2. 在设置面板中找到**参数**输入字段
18+
3. 将以下配置复制到**参数**中:
19+
20+
```json
21+
{
22+
"thinkingConfig": {
23+
"includeThoughts": true
24+
}
25+
}
26+
```
27+
28+
## 理解思考模式
29+
30+
Gemini 思考模式让模型能够在提供回答前进行更详细的推理。这一功能特别适用于:
31+
32+
- 复杂问题解决
33+
- 多步骤推理任务
34+
- 详细分析和规划
35+
- 代码生成和调试
36+
37+
虽然思考功能在 Gemini 2.5 系列模型中默认启用,但将 `thinkingConfig` 参数中的 `includeThoughts` 设置为 `true` 可以让您通过思考摘要查看模型的推理过程。这些摘要让您能够了解模型的内部思考,使推理过程在响应中可见,帮助您理解模型如何得出结论。
38+
39+
思考摘要的价值在于:
40+
- 验证模型的解题思路
41+
- 理解复杂答案背后的推理逻辑
42+
- 让用户了解长时间任务的进展
43+
- 发现推理中可能出现的错误
44+
45+
如果您想进一步调整思考过程,还可以设置思考预算:
46+
47+
```json
48+
{
49+
"thinkingConfig": {
50+
"includeThoughts": true,
51+
"thinkingBudget": 16000
52+
}
53+
}
54+
```
55+
56+
`thinkingBudget` 参数让您可以控制模型在生成响应时可以使用的思考token数量:
57+
58+
- **范围**:必须是 0 到 24576 之间的整数
59+
- **默认值**:如果未指定,Gemini 会根据请求的复杂度自动调整预算
60+
- **禁用思考**:将预算设置为 0 会完全禁用思考
61+
- **复杂任务推荐值**:8000-16000 tokens
62+
- **模型支持**:请注意,`thinkingBudget` 仅在 Gemini 2.5 Flash 中支持
63+
64+
更高的 token 数量通常能够支持更详细的推理,这对解决复杂任务很有帮助。不过,根据您提供的 prompt 不同,模型实际使用的token可能会比设定的预算多一些或少一些。
65+
66+
## 故障排除
67+
68+
如果您在使用思考模式时遇到问题:
69+
70+
- 确保您的 Google API 密钥有权限访问 Gemini 2.5 模型
71+
- 检查 JSON 参数格式是否正确
72+
- 如果响应不完整或不够详细,尝试调整思考预算
73+
- 对于非常复杂的任务,考虑将其拆分为更小的步骤
74+
75+
有关 Google Gemini 配置的更多信息,请参阅 [Google AI 配置指南](google-configuration.md)

0 commit comments

Comments
 (0)