From 81bb80c63850ddeee7b4e1014e9fac262168416e Mon Sep 17 00:00:00 2001 From: xszyou Date: Mon, 22 May 2023 13:58:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DChatGPT=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9B=B8=E5=90=8C=E4=BC=9A=E8=AF=9D=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复ChatGPT无法使用相同会话的bug --- ai_module/nlp_gpt.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ai_module/nlp_gpt.py b/ai_module/nlp_gpt.py index bce81ba..b5b79e5 100644 --- a/ai_module/nlp_gpt.py +++ b/ai_module/nlp_gpt.py @@ -20,8 +20,11 @@ def question(cont): try: chatbot = Chatbot(config={ "access_token": cfg.key_gpt_access_token, - "conversation_id": cfg.key_gpt_conversation_id - }) + "paid": False, + "collect_analytics": True, + "conversation_id":cfg.key_gpt_conversation_id + },conversation_id=cfg.key_gpt_conversation_id, + parent_id=None) prompt = text + ' 现在想咨询的问题是:'+cont response = ""