From 09da176128ab3ebb5aa11530b0218fb2f49a52fc Mon Sep 17 00:00:00 2001 From: yym68686 Date: Sat, 17 Aug 2024 18:07:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Bug:=20Fix=20the=20bug=20where?= =?UTF-8?q?=20the=20system=20prompt=20environment=20variable=20setting=20o?= =?UTF-8?q?nly=20takes=20effect=20in=20the=20first=20conversation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 💻 Code: Upgrade ModelMerge version to 0.10.7 --- ModelMerge | 2 +- bot.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ModelMerge b/ModelMerge index dbe7048c..9bb6ce33 160000 --- a/ModelMerge +++ b/ModelMerge @@ -1 +1 @@ -Subproject commit dbe7048ce4e3d2e8bc2db5eee10cdcbc7b199b36 +Subproject commit 9bb6ce33c8052e0868a0f1a33c7b7f0187d33349 diff --git a/bot.py b/bot.py index b61c3773..74e5b268 100644 --- a/bot.py +++ b/bot.py @@ -187,6 +187,7 @@ async def getChatGPT(update, context, title, robot, message, chatid, messageid, image_has_send = 0 model_name = Users.get_config(convo_id, "engine") language = Users.get_config(convo_id, "language") + systemprompt = Users.get_config(convo_id, "systemprompt") Frequency_Modification = 20 if "gpt-4o" in model_name: @@ -206,7 +207,7 @@ async def getChatGPT(update, context, title, robot, message, chatid, messageid, )).message_id try: - async for data in robot.ask_stream(text, convo_id=convo_id, pass_history=pass_history, model=model_name, language=language, api_url=api_url, api_key=api_key): + async for data in robot.ask_stream(text, convo_id=convo_id, pass_history=pass_history, model=model_name, language=language, api_url=api_url, api_key=api_key, systemprompt=systemprompt): # for data in robot.ask_stream(text, convo_id=convo_id, pass_history=pass_history, model=model_name): if stop_event.is_set() and convo_id == target_convo_id and answer_messageid < reset_mess_id: return