From 7479c3462169d7ef59bc43526379f11f9c4cc2e4 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Mon, 19 Dec 2022 22:47:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BE=93=E5=87=BA!list=E6=97=B6?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E5=AD=97=E7=AC=A6=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config-template.py | 2 +- pkg/openai/session.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config-template.py b/config-template.py index 63eba7b0..b30da67a 100644 --- a/config-template.py +++ b/config-template.py @@ -46,7 +46,7 @@ default_prompt = "如果我之后想获取帮助,请你说“输入!help获取 # 正则表达式简明教程:https://www.runoob.com/regexp/regexp-tutorial.html response_rules = { "prefix": ["/ai", "!ai", "!ai", "ai"], - "regexp": ["为什么.*", "怎么?样.*", "如何.*", "[Hh]ow to.*", "[Ww]hy not.*", "[Ww]hat is.*", ] + "regexp": ["为什么.*", "怎么?样.*", "怎么.*", "如何.*", "[Hh]ow to.*", "[Ww]hy not.*", "[Ww]hat is.*", ".*怎么办", ".*咋办"] } # 单个api-key的使用量警告阈值 diff --git a/pkg/openai/session.py b/pkg/openai/session.py index 8e65a338..56402fcb 100644 --- a/pkg/openai/session.py +++ b/pkg/openai/session.py @@ -264,5 +264,4 @@ class Session: def list_history(self, capacity: int = 10, page: int = 0): return pkg.database.manager.get_inst().list_history(self.name, capacity, page, - (self.user_name + ":" + get_default_prompt() + "\n" + - self.bot_name + ":") if get_default_prompt() != "" else "") + get_default_prompt())