Sfoglia il codice sorgente

fix: variable name compatibility modification

master
zhayujie GitHub 1 anno fa
parent
commit
8107165792
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      bot/openai/open_ai_bot.py

+ 2
- 2
bot/openai/open_ai_bot.py Vedi File

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

@staticmethod
def clear_all_session():
user_session.clear()
user_session.clear()

Loading…
Annulla
Salva