lss233 / chatgpt-mirai-qq-bot

🚀 一键部署!真正的 AI 聊天机器人!支持ChatGPT、文心一言、讯飞星火、Bing、Bard、ChatGLM、POE,多账号,人设调教,虚拟女仆、图片渲染、语音发送 | 支持 QQ、Telegram、Discord、微信 等平台
GNU Affero General Public License v3.0
13.16k stars 1.56k forks source link

[BUG] 只填写Bing的情况下无法使用 #379

Closed Leo01234 closed 1 year ago

Leo01234 commented 1 year ago

提交 issue 前,请先确认:

表现
v2.2.4删除openai相关配置后报错

Traceback (most recent call last):
   File "/app/bot.py", line 8, in <module>
     from constants import config
   File "/app/constants.py", line 7, in <module>
     botManager = BotManager(config)
                  ^^^^^^^^^^^^^^^^^^
   File "/app/manager/bot.py", line 48, in __init__
     if config.openai.browserless_endpoint:
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AttributeError: 'NoneType' object has no attribute 'browserless_endpoint'
 /usr/lib/python3/dist-packages/gi/overrides/Gtk.py:1649: Warning: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
   return _Gtk_main(*args, **kwargs)

运行环境:

复现步骤
描述你是如何触发这个 BUG 的

  1. 更新至最新版本
  2. 删除配置文件中openai有关内容
  3. docker compose up -d
  4. See error

预期行为
可以正常使用new bing

其他内容
添加openai.browserless_endpoint配置信息后会报找不到openai账号的错误

Originally posted by @Leo01234 in https://github.com/lss233/chatgpt-mirai-qq-bot/issues/363#issuecomment-1471309042

benzcls63amg commented 1 year ago

我试了一下,不删除openai登录部分·的代码bing就可以运行。注释掉openai部分就异常