From 7e7671404e3d746b626282b0144beac6b779d1d8 Mon Sep 17 00:00:00 2001 From: yym68686 Date: Tue, 21 May 2024 15:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=BB=20Code:=201.=20Refactor=20the=20co?= =?UTF-8?q?de,=20simplify=20the=20function=20call=20code.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2. Upgrade ModelMerge version to 0.4.7 --- bot.py | 3 ++- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 219f8f4a..b02e6c8a 100644 --- a/bot.py +++ b/bot.py @@ -15,6 +15,7 @@ WEB_HOOK, PORT, BOT_TOKEN, + Users, update_first_buttons_message, update_model_buttons, get_current_lang, @@ -181,7 +182,7 @@ async def getChatGPT(update, context, title, robot, message, chatid, messageid): image_has_send = 0 try: - for data in robot.ask_stream(text, convo_id=str(chatid), pass_history=pass_history): + for data in robot.ask_stream(text, convo_id=str(chatid), pass_history=pass_history, model=Users.get_config(chatid, "engine")): if "🌐" not in data: result = result + data tmpresult = result diff --git a/requirements.txt b/requirements.txt index 3004a104..dac6558d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ pytz python-dotenv md2tgmd==0.1.9 -ModelMerge==0.5.4 +ModelMerge==0.5.5 fake_useragent oauth2client==3.0.0 python-telegram-bot[webhooks,rate-limiter]==21.0.1 \ No newline at end of file