From d6c92e1fd5f0c7ef730062a9ed5d01072ec96652 Mon Sep 17 00:00:00 2001 From: goldfishh Date: Thu, 9 Mar 2023 23:13:53 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=B6=88=E6=81=AF=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=83=AD=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/chatgpt/chat_gpt_bot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bot/chatgpt/chat_gpt_bot.py b/bot/chatgpt/chat_gpt_bot.py index 71c5a8a..43ffa61 100644 --- a/bot/chatgpt/chat_gpt_bot.py +++ b/bot/chatgpt/chat_gpt_bot.py @@ -1,7 +1,7 @@ # encoding:utf-8 from bot.bot import Bot -from config import conf +from config import conf, load_config from common.log import logger from common.expired_dict import ExpiredDict import openai @@ -30,7 +30,10 @@ class ChatGPTBot(Bot): return '记忆已清除' elif query == '#清除所有': Session.clear_all_session() - return '所有人记忆已清除' + return '所有人记忆已清除' + elif query == '#更新配置': + load_config() + return '配置已更新' session = Session.build_session_query(query, session_id) logger.debug("[OPEN_AI] session query={}".format(session))