fix: disable end_prompt, filter more thinking patterns from antaf
end_prompt was being sent to antaf as user message, causing LLM to output its thinking process. Disabled end_prompt and added more thinking patterns to filter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ad2e91df8f
commit
78bc3f71c0
|
|
@ -13,9 +13,7 @@ prompt: ""
|
||||||
system_error_response: "抱歉,小虎现在有点忙,咱们稍后再聊。"
|
system_error_response: "抱歉,小虎现在有点忙,咱们稍后再聊。"
|
||||||
|
|
||||||
end_prompt:
|
end_prompt:
|
||||||
enable: true
|
enable: false
|
||||||
prompt: |
|
|
||||||
请你以关心对方健康的语气结束对话,提醒注意休息、按时吃药、保持好心情,像一位贴心的家庭医生告别。
|
|
||||||
|
|
||||||
wakeup_words:
|
wakeup_words:
|
||||||
- "你好小智"
|
- "你好小智"
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,17 @@ class LLMProvider(LLMProviderBase):
|
||||||
def _is_thinking(text):
|
def _is_thinking(text):
|
||||||
"""检测蚂蚁阿福的内心思考/推理过程,这些不应该发给用户"""
|
"""检测蚂蚁阿福的内心思考/推理过程,这些不应该发给用户"""
|
||||||
thinking_patterns = [
|
thinking_patterns = [
|
||||||
"用户问", "用户说", "用户的", "用户可能", "用户真正",
|
"用户问", "用户说", "用户的", "用户可能", "用户真正", "用户让我",
|
||||||
"我得", "我会", "我在想", "我决定", "我要",
|
"我得", "我会", "我在想", "我决定", "我要", "我需要确保", "我需要",
|
||||||
"语气比较", "感觉他", "让他知道", "让他觉得",
|
"语气比较", "感觉他", "让他知道", "让他觉得",
|
||||||
"先安抚", "得先", "不想表现",
|
"先安抚", "得先", "不想表现",
|
||||||
"整体语气", "这样能", "这样他",
|
"整体语气", "这样能", "这样他",
|
||||||
"所以我", "还带了个",
|
"所以我", "还带了个",
|
||||||
|
"首先记录", "是否有其他", "在这种情况下",
|
||||||
|
"必须遵循", "角色设定", "确保回复",
|
||||||
|
"避免任何生硬", "技术性的表达",
|
||||||
|
"提供的日期", "作为测试", "模拟使用",
|
||||||
|
"需要确认或澄清", "普遍适用性",
|
||||||
]
|
]
|
||||||
for p in thinking_patterns:
|
for p in thinking_patterns:
|
||||||
if p in text:
|
if p in text:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue