mirror of
https://github.com/deepseek-ai/awesome-deepseek-agent.git
synced 2026-11-05 01:07:37 +00:00
[GH-ISSUE #76] 开启思考模式后,如何确保思考过程输出的是中文? #27
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/awesome-deepseek-agent#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @qq824810885 on GitHub (May 7, 2026).
Original GitHub issue: https://github.com/deepseek-ai/awesome-deepseek-agent/issues/76
目前在Agent里面经常输出英文。我看官方APP和网页思考过程是中文的。
是不是有什么办法可以控制思考过程的输出语言?
@lloydzhou commented on GitHub (May 8, 2026):
提示词改成中文版。有比较大概率思考过程也是中文;
如果不想大面积改动,可以尝试将system prompt的最前面和最后面使用中文,参考bash-agent中Prompt 组装逻辑实践过程中思考为中文的概率应该在80%左右:
agent-identity(按 locale 翻译,提供语言启动——头部锚定)...
output-language(尾部重申,语言约束作为 system prompt 的最后内容——近因锚定)@hzpconnor commented on GitHub (May 9, 2026):
自己翻译一下不就行了
@morlay commented on GitHub (May 20, 2026):
并无法完全保证,我整个中文化依然会偶发英文 thinking
当然加了这段会好很多
https://github.com/morlay/deepseek-harness/blob/main/src/agents/prompts/shared/language.md
@tianhao8687 commented on GitHub (Aug 17, 2026):
目前没有一个 API 参数能保证
reasoning_content始终使用中文。中文 system prompt、中文上下文以及在 system prompt 首尾重复语言约束,通常只能提高概率,不能形成硬保证。可以加入类似约束:
还有一个容易踩坑的点:DeepSeek 的思考模式文档要求,在发生工具调用后,原始
reasoning_content必须完整回传。因此不能为了“中文化”而先翻译或改写它再送回 API,否则会破坏多轮工具调用。若产品界面必须显示中文,可以对“展示副本”做翻译,但给下一轮 API 的仍应是未经修改的原文。如果需求只是保证用户看到的答案为中文,最好只把“最终输出语言”设为硬约束,不把业务逻辑依赖在思考过程的语言上。