chatgpt-on-wechat icon indicating copy to clipboard operation
chatgpt-on-wechat copied to clipboard

发送文本后服务器端发生异常

Open iMaxSys opened this issue 1 year ago • 2 comments

[INFO][2023-03-16 12:26:19][chat_gpt_bot.py:28] - [OPEN_AI] query=你来自哪里 [ERROR][2023-03-16 12:26:19][wechat_channel.py:163] - module 'openai.error' has no attribute 'Timeout' Traceback (most recent call last): File "/app/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 65, in reply_text response = openai.ChatCompletion.create( AttributeError: module 'openai' has no attribute 'ChatCompletion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/app/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 159, in _do_send_text reply_text = super().build_reply_content(query, context) File "/app/chatgpt-on-wechat/channel/channel.py", line 31, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/app/chatgpt-on-wechat/bridge/bridge.py", line 18, in fetch_reply_content return bot_factory.create_bot(bot_type).reply(query, context) File "/app/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 47, in reply reply_content = self.reply_text(session, session_id, 0) File "/app/chatgpt-on-wechat/bot/chatgpt/chat_gpt_bot.py", line 92, in reply_text except openai.error.Timeout as e: AttributeError: module 'openai.error' has no attribute 'Timeout'

iMaxSys avatar Mar 16 '23 04:03 iMaxSys

I met this error, too

zus12873 avatar Mar 16 '23 06:03 zus12873

两个问题:

  1. openai版本需要升级到 0.27.0
  2. 网络不通,参考 #351

zhayujie avatar Mar 16 '23 12:03 zhayujie