Browse Source

fix: variable name compatibility modification #415

master
zhayujie GitHub 1 year ago
parent
commit
8fa4041fc2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      bot/chatgpt/chat_gpt_bot.py

+ 1
- 1
bot/chatgpt/chat_gpt_bot.py View File

@@ -24,7 +24,7 @@ class ChatGPTBot(Bot):
# acquire reply content
if not context or not context.get('type') or context.get('type') == 'TEXT':
logger.info("[OPEN_AI] query={}".format(query))
session_id = context['session_id']
session_id = context.get('session_id') or context.get('from_user_id')
if query == '#清除记忆':
Session.clear_session(session_id)
return '记忆已清除'


Loading…
Cancel
Save