Skip to content

Commit

Permalink
šŸ› Bug: Fix the bug where the system prompt environment variable settiā€¦
Browse files Browse the repository at this point in the history
ā€¦ng only takes effect in the first conversation.

šŸ’» Code: Upgrade ModelMerge version to 0.10.7
  • Loading branch information
yym68686 committed Aug 17, 2024
1 parent fe5dab4 commit 09da176
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ModelMerge
3 changes: 2 additions & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 09da176

Please sign in to comment.