Files
Sdf1_login/src/main
youpaishidifu 6072ce5e4c
Auto Release / build (push) Successful in 2m58s
输出语言硬约束:models.json 顶层「输出语言」字段进 system prompt
背景:玩家用俄文/英文等外语提问时,AI 顺着外语回复(截图:俄文提问
→ 意大利语回复)。人设部分只有软约束,模型不遵守;且「输出语言」
字段虽已在 models.json 模板,代码从未读取。
修复:buildSystemPrompt 读取 models.json 顶层「输出语言」字段,
以「最高优先级」措辞注入 system prompt,明确「无论玩家用什么语言
提问,回复正文必须始终使用简体中文」。手动@与自动互动两条路径
共用 buildSystemPrompt,一并覆盖。字段缺失/为空时静默跳过。
2026-11-17 15:39:24 +08:00
..