zhayujie / bot-on-anything

Connect AI models (like ChatGPT-3.5/4.0, Baidu Yiyan, New Bing, Bard) to apps (like Wechat, public account, DingTalk, Telegram, QQ). 将 ChatGPT、必应、文心一言、谷歌Bard 等对话模型连接各类应用,如微信、公众号、QQ、Telegram、Gmail、Slack、Web、企业微信、飞书、钉钉等。
MIT License
3.81k stars 896 forks source link

bing接口失效 #441

Open imhut opened 11 months ago

imhut commented 11 months ago

根据https://github.com/acheong08/EdgeGPT修改了部分代码,始终也没办法不报错

"text":{"content":" hi"},"robotCode":"dingajrky8i9mzle4wjn","msgtype":"text"}' [2023-07-28 08:19:16,529] ERROR in app: Exception on / [POST] Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1486, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/root/bot-on-anything/channel/dingtalk/dingtalk_channel.py", line 288, in chat handler.chat(dd, data) File "/root/bot-on-anything/channel/dingtalk/dingtalk_channel.py", line 205, in chat reply = channel.handle(data) File "/root/bot-on-anything/channel/dingtalk/dingtalk_channel.py", line 253, in handle reply = super().build_reply_content(prompt, context) File "/root/bot-on-anything/channel/channel.py", line 31, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/root/bot-on-anything/bridge/bridge.py", line 18, in fetch_reply_content return model_factory.create_bot(type).reply(query, context) File "/root/bot-on-anything/model/model_factory.py", line 29, in create_bot from model.bing.new_bing_model import BingModel File "/root/bot-on-anything/model/bing/new_bing_model.py", line 11, in from model.bing.jailbroken_sydney import SydneyBot File "/root/bot-on-anything/model/bing/jailbroken_sydney.py", line 14, in class SydneyBot(Chatbot): File "/root/bot-on-anything/model/bing/jailbroken_sydney.py", line 18, in SydneyBot cookies: dict | None = None, TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' 5***** - - [28/Jul/2023 08:19:16] "POST / HTTP/1.1" 500 -

已经没能力继续修改了,希望能更新一下bing的代码

imhut commented 9 months ago

自己来回答,注释掉from model.bing.jailbroken_sydney import SydneyBot就行了,过了这么多天才有空搞这个问题,当时临门一脚放弃了。。。