Fix answer_it

Fix stream message overtime
Fix gemini history.clear while stream
Feat: Complete mode (non stream)
Chore: preset some settings
This commit is contained in:
Alter-xyz
2024-07-02 08:27:21 -04:00
parent 4d0b9ee799
commit 8b55a1442c
2 changed files with 158 additions and 36 deletions

View File

@ -168,7 +168,10 @@ def gemini_pro_handler(message: Message, bot: TeleBot) -> None:
except Exception as e:
print(e)
bot_reply_markdown(reply_id, who, "answer wrong", bot)
player.history.clear()
try:
player.history.clear()
except:
print(f"\n------\n{who} history.clear() Error / Unstoppable\n------\n")
return
@ -243,7 +246,10 @@ def gemini_audio_handler(message: Message, bot: TeleBot) -> None:
except Exception as e:
print(e)
bot_reply_markdown(reply_id, who, "answer wrong", bot)
player.history.clear()
try:
player.history.clear()
except:
print(f"\n------\n{who} history.clear() Error / Unstoppable\n------\n")
return