From 89ed31a888131f923b1afa7452fb137c672f1d04 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Sat, 25 Nov 2023 11:55:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E5=9C=A8cmd=5Fconfig?= =?UTF-8?q?=E4=B8=AD=E8=AE=BE=E7=BD=AEllm=5Fenv=5Fprompt=E6=9D=A5=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=8E=AF=E5=A2=83=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cores/qqbot/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/qqbot/core.py b/cores/qqbot/core.py index d77dc5a1a..61474e52c 100644 --- a/cores/qqbot/core.py +++ b/cores/qqbot/core.py @@ -117,6 +117,7 @@ cc.init_attributes(["other_admins"], []) cc.init_attributes(["CHATGPT_BASE_URL"], "") cc.init_attributes(["qqbot_appid"], "") cc.init_attributes(["qqbot_secret"], "") +cc.init_attributes(["llm_env_prompt"], "> hint: 末尾根据内容和心情添加 1-2 个emoji") # cc.init_attributes(["qq_forward_mode"], False) # QQ机器人 @@ -692,7 +693,7 @@ async def oper_msg(message: Union[GroupMessage, FriendMessage, GuildMessage, Nak qq_msg = qq_msg[3:] web_sch_flag = True else: - qq_msg += "> hint: 末尾根据内容和心情添加1-2个emoji" + qq_msg += cc.get("llm_env_prompt", "") if chosen_provider == REV_CHATGPT or chosen_provider == OPENAI_OFFICIAL: if _global_object.web_search or web_sch_flag: official_fc = chosen_provider == OPENAI_OFFICIAL