mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-21 14:17:11 +08:00
fix: variable name compatibility modification
This commit is contained in:
@@ -18,7 +18,7 @@ class OpenAIBot(Bot):
|
|||||||
# acquire reply content
|
# acquire reply content
|
||||||
if not context or not context.get('type') or context.get('type') == 'TEXT':
|
if not context or not context.get('type') or context.get('type') == 'TEXT':
|
||||||
logger.info("[OPEN_AI] query={}".format(query))
|
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 == '#清除记忆':
|
if query == '#清除记忆':
|
||||||
Session.clear_session(from_user_id)
|
Session.clear_session(from_user_id)
|
||||||
return '记忆已清除'
|
return '记忆已清除'
|
||||||
|
|||||||
Reference in New Issue
Block a user