perf: 完善响应机制

This commit is contained in:
Rock Chin
2022-12-19 17:25:09 +08:00
parent eada778ab5
commit 1f5329edc9
2 changed files with 2 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ default_prompt = "如果我之后想获取帮助,请你说“输入!help获取
# 前缀匹配优先级高于正则表达式匹配
# 正则表达式简明教程https://www.runoob.com/regexp/regexp-tutorial.html
response_rules = {
"prefix": ["/ai", "!ai", "ai", "/chat", "!chat", "chat"],
"prefix": ["/ai", "!ai", "ai", "ai"],
"regexp": ["为什么.*", "怎么?样.*", "如何.*", "[Hh]ow to.*", "[Ww]hy not.*", "[Ww]hat is.*", ]
}

View File

@@ -318,7 +318,7 @@ class QQBotManager:
check, result = check_response_rule(str(event.message_chain).strip())
if check:
reply = process(result)
reply = process(result.strip())
else:
# 直接调用
reply = process()