mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-07-06 14:56:43 +08:00
@ -22,9 +22,9 @@ if DIFY_API_KEY:
|
||||
client = ChatClient(api_key=DIFY_API_KEY)
|
||||
|
||||
# Global history cache
|
||||
dify_player_dict = ExpiringDict(max_len=1000, max_age_seconds=300)
|
||||
dify_player_dict = ExpiringDict(max_len=1000, max_age_seconds=600)
|
||||
dify_player_c = ExpiringDict(
|
||||
max_len=1000, max_age_seconds=300
|
||||
max_len=1000, max_age_seconds=600
|
||||
) # History cache is supported by dify cloud conversation_id.
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ def dify_handler(message: Message, bot: TeleBot) -> None:
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
bot_reply_markdown(reply_id, who, "answer wrong", bot)
|
||||
bot.reply_to(message, "answer wrong maybe up to the max token")
|
||||
# pop my user
|
||||
player_message.pop()
|
||||
return
|
||||
|
Reference in New Issue
Block a user