mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
perf: 完善响应机制
This commit is contained in:
@@ -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.*", ]
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user