lss233 / chatgpt-mirai-qq-bot

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

[BUG] NewBing(EdgeGPT)画图报错adaptiveCards #1137

Open pipinstalljoey opened 1 year ago

pipinstalljoey commented 1 year ago

提交 issue 前,请先确认:

表现
描述 BUG 的表现情况

运行环境:

复现步骤
描述你是如何触发这个 BUG 的 1.发送“帮我画...的画“ 。 e.g. 帮我画一幅猫的画 2.提示出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。 原因:'adaptiveCards'

预期行为
发送一张图片

截图

截屏2023-08-08 20 35 04

其他内容
日志输出内容

chatgpt-qq-gocqhttp-1    | [2023-08-08 20:29:32] [INFO]: 收到好友 pip install Joey(2096295544) 的消息: 帮我画一幅猫的画 (-1624921270) 
chatgpt-qq-chatgpt-1     | 2023-08-08 12:29:32.416 | DEBUG    | platforms.onebot_bot:_:148 - 私聊消息:帮我画一幅猫的画
chatgpt-qq-chatgpt-1     | 2023-08-08 12:29:32.424 | DEBUG    | middlewares.concurrentlock:handle_request:40 - [Concurrent] 排队中,前面还有 0 个人!
chatgpt-qq-chatgpt-1     | 2023-08-08 12:29:32.424 | DEBUG    | middlewares.concurrentlock:handle_request:42 - [Concurrent] 排到了!
chatgpt-qq-chatgpt-1     | 2023-08-08 12:29:32.424 | DEBUG    | middlewares.timeout:create_timeout_task:61 - [Timeout] 开始计时……
chatgpt-qq-chatgpt-1     | ..........Sending request...
chatgpt-qq-chatgpt-1     | Waiting for results...
chatgpt-qq-chatgpt-1     | 2023-08-08 12:30:02.426 | DEBUG    | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:我还在思考中,请再等一下~
chatgpt-qq-gocqhttp-1    | [2023-08-08 20:30:02] [INFO]: 发送好友 2096295544(2096295544)  的消息: [{"type":  ... (-1189317355) 
chatgpt-qq-chatgpt-1     | 2023-08-08 12:30:02.431 | DEBUG    | middlewares.timeout:on_respond:46 - [Timeout] 取消计时……
chatgpt-qq-chatgpt-1     | 2023-08-08 12:30:02.431 | DEBUG    | middlewares.timeout:create_timeout_task:64 - [Timeout] 等待过久,发送提示
chatgpt-qq-chatgpt-1     | 2023-08-08 12:30:21.042 | ERROR    | middlewares.timeout:handle_request:36 - 发生错误: 'adaptiveCards'
chatgpt-qq-chatgpt-1     | 2023-08-08 12:30:21.042 | ERROR    | universal:handle_message:297 - 'adaptiveCards'
chatgpt-qq-chatgpt-1     | Traceback (most recent call last):
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/bot.py", line 58, in <module>
chatgpt-qq-chatgpt-1     |     loop.run_until_complete(asyncio.gather(*bots))
chatgpt-qq-chatgpt-1     |     │    │                  │       │       └ [<Task pending name='Task-2' coro=<start_task() running at /app/platforms/onebot_bot.py:356> wait_for=<_GatheringFuture pendi...
chatgpt-qq-chatgpt-1     |     │    │                  │       └ <function gather at 0x7f23bf9e8860>
chatgpt-qq-chatgpt-1     |     │    │                  └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
chatgpt-qq-chatgpt-1     |     │    └ <function BaseEventLoop.run_until_complete at 0x7f23bf9ed620>
chatgpt-qq-chatgpt-1     |     └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/asyncio/base_events.py", line 640, in run_until_complete
chatgpt-qq-chatgpt-1     |     self.run_forever()
chatgpt-qq-chatgpt-1     |     │    └ <function BaseEventLoop.run_forever at 0x7f23bf9ed580>
chatgpt-qq-chatgpt-1     |     └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
chatgpt-qq-chatgpt-1     |     self._run_once()
chatgpt-qq-chatgpt-1     |     │    └ <function BaseEventLoop._run_once at 0x7f23bf9ef380>
chatgpt-qq-chatgpt-1     |     └ <_UnixSelectorEventLoop running=True closed=False debug=False>
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
chatgpt-qq-chatgpt-1     |     handle._run()
chatgpt-qq-chatgpt-1     |     │      └ <function Handle._run at 0x7f23bff4c2c0>
chatgpt-qq-chatgpt-1     |     └ <Handle Task.task_wakeup(<Future finished result=None>)>
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
chatgpt-qq-chatgpt-1     |     self._context.run(self._callback, *self._args)
chatgpt-qq-chatgpt-1     |     │    │            │    │           │    └ <member '_args' of 'Handle' objects>
chatgpt-qq-chatgpt-1     |     │    │            │    │           └ <Handle Task.task_wakeup(<Future finished result=None>)>
chatgpt-qq-chatgpt-1     |     │    │            │    └ <member '_callback' of 'Handle' objects>
chatgpt-qq-chatgpt-1     |     │    │            └ <Handle Task.task_wakeup(<Future finished result=None>)>
chatgpt-qq-chatgpt-1     |     │    └ <member '_context' of 'Handle' objects>
chatgpt-qq-chatgpt-1     |     └ <Handle Task.task_wakeup(<Future finished result=None>)>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/platforms/onebot_bot.py", line 151, in _
chatgpt-qq-chatgpt-1     |     await handle_message(
chatgpt-qq-chatgpt-1     |           └ <function handle_message at 0x7f238145c180>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     | > File "/app/universal.py", line 271, in handle_message
chatgpt-qq-chatgpt-1     |     await action(session_id, message.strip(), conversation_context, respond)
chatgpt-qq-chatgpt-1     |           │      │           │       │        │                     └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │      │           │       │        └ <conversation.ConversationContext object at 0x7f2381dc3810>
chatgpt-qq-chatgpt-1     |           │      │           │       └ <method 'strip' of 'str' objects>
chatgpt-qq-chatgpt-1     |           │      │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │      └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380669620>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1     |     await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        │                     └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380668ae0>
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        └ None
chatgpt-qq-chatgpt-1     |           │ │              │           │        └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │ │              │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │ │              └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           │ └ <function MiddlewareConcurrentLock.handle_request at 0x7f238145c900>
chatgpt-qq-chatgpt-1     |           └ <middlewares.concurrentlock.MiddlewareConcurrentLock object at 0x7f238144a9d0>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/middlewares/concurrentlock.py", line 43, in handle_request
chatgpt-qq-chatgpt-1     |     await action(session_id, prompt, conversation_context, respond)
chatgpt-qq-chatgpt-1     |           │      │           │       │                     └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │      │           │       └ None
chatgpt-qq-chatgpt-1     |           │      │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │      └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380668ae0>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1     |     await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        │                     └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380668680>
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        └ None
chatgpt-qq-chatgpt-1     |           │ │              │           │        └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │ │              │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │ │              └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           │ └ <function Middleware.handle_request at 0x7f238143fce0>
chatgpt-qq-chatgpt-1     |           └ <middlewares.baiducloud.MiddlewareBaiduCloud object at 0x7f238144ad50>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/middlewares/middleware.py", line 9, in handle_request
chatgpt-qq-chatgpt-1     |     await action(session_id, prompt, conversation_context, respond)
chatgpt-qq-chatgpt-1     |           │      │           │       │                     └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │      │           │       └ None
chatgpt-qq-chatgpt-1     |           │      │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │      └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380668680>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1     |     await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        │                     └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380668e00>
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        └ None
chatgpt-qq-chatgpt-1     |           │ │              │           │        └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │ │              │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │ │              └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           │ └ <function MiddlewareRatelimit.handle_request at 0x7f238143ff60>
chatgpt-qq-chatgpt-1     |           └ <middlewares.ratelimit.MiddlewareRatelimit object at 0x7f238144aa10>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/middlewares/ratelimit.py", line 23, in handle_request
chatgpt-qq-chatgpt-1     |     await action(session_id, prompt, conversation_context, respond)
chatgpt-qq-chatgpt-1     |           │      │           │       │                     └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │      │           │       └ None
chatgpt-qq-chatgpt-1     |           │      │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │      └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           └ <function handle_message.<locals>.wrap_request.<locals>.call at 0x7f2380668e00>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/universal.py", line 53, in call
chatgpt-qq-chatgpt-1     |     await m.handle_request(session_id, message, respond, conversation_context, n)
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        │                     └ <function handle_message.<locals>.request at 0x7f2380668ea0>
chatgpt-qq-chatgpt-1     |           │ │              │           │        │        └ None
chatgpt-qq-chatgpt-1     |           │ │              │           │        └ <function handle_message.<locals>.respond at 0x7f2380668d60>
chatgpt-qq-chatgpt-1     |           │ │              │           └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |           │ │              └ 'friend-2096295544'
chatgpt-qq-chatgpt-1     |           │ └ <function MiddlewareTimeout.handle_request at 0x7f238145ca40>
chatgpt-qq-chatgpt-1     |           └ <middlewares.timeout.MiddlewareTimeout object at 0x7f238144cad0>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/middlewares/timeout.py", line 40, in handle_request
chatgpt-qq-chatgpt-1     |     raise e
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/middlewares/timeout.py", line 27, in handle_request
chatgpt-qq-chatgpt-1     |     await asyncio.wait_for(coro_task, config.response.max_timeout)
chatgpt-qq-chatgpt-1     |           │       │        │          │      │        └ 600.0
chatgpt-qq-chatgpt-1     |           │       │        │          │      └ Response(mode='mixed', buffer_delay=15, default_ai='bing', error_format='出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯...
chatgpt-qq-chatgpt-1     |           │       │        │          └ Config(onebot=Onebot(manager_qq=2096295544, reverse_ws_host='0.0.0.0', reverse_ws_port=8554), mirai=None, telegram=None, disc...
chatgpt-qq-chatgpt-1     |           │       │        └ <Task finished name='Task-81' coro=<handle_message.<locals>.request() done, defined at /app/universal.py:107> exception=KeyEr...
chatgpt-qq-chatgpt-1     |           │       └ <function wait_for at 0x7f23bf9e82c0>
chatgpt-qq-chatgpt-1     |           └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
chatgpt-qq-chatgpt-1     |     return fut.result()
chatgpt-qq-chatgpt-1     |            │   └ <method 'result' of '_asyncio.Task' objects>
chatgpt-qq-chatgpt-1     |            └ <Task finished name='Task-81' coro=<handle_message.<locals>.request() done, defined at /app/universal.py:107> exception=KeyEr...
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/universal.py", line 224, in request
chatgpt-qq-chatgpt-1     |     async for rendered in task:
chatgpt-qq-chatgpt-1     |               │           └ <async_generator object retry.<locals>.decorator.<locals>.wrapper at 0x7f2381411210>
chatgpt-qq-chatgpt-1     |               └ None
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/utils/retry.py", line 21, in wrapper
chatgpt-qq-chatgpt-1     |     async for result in func(*args, **kwargs):
chatgpt-qq-chatgpt-1     |               │         │     │       └ {'prompt': '帮我画一幅猫的画', 'chain': MessageChain([Plain(text='帮我画一幅猫的画')]), 'name': 'pip install Joey'}
chatgpt-qq-chatgpt-1     |               │         │     └ (<conversation.ConversationContext object at 0x7f2381dc3810>,)
chatgpt-qq-chatgpt-1     |               │         └ <function ConversationContext.ask at 0x7f238143f560>
chatgpt-qq-chatgpt-1     |               └ None
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/conversation.py", line 195, in ask
chatgpt-qq-chatgpt-1     |     async for item in self.adapter.ask(prompt):
chatgpt-qq-chatgpt-1     |               │       │    │       │   └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |               │       │    │       └ <function BingAdapter.ask at 0x7f23816f4900>
chatgpt-qq-chatgpt-1     |               │       │    └ <adapter.ms.bing.BingAdapter object at 0x7f2381c48610>
chatgpt-qq-chatgpt-1     |               │       └ <conversation.ConversationContext object at 0x7f2381dc3810>
chatgpt-qq-chatgpt-1     |               └ '\n'
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/adapter/ms/bing.py", line 129, in ask
chatgpt-qq-chatgpt-1     |     raise e
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/app/adapter/ms/bing.py", line 63, in ask
chatgpt-qq-chatgpt-1     |     async for final, response in self.bot.ask_stream(prompt=prompt,
chatgpt-qq-chatgpt-1     |               │      │           │    │   │                 └ '帮我画一幅猫的画'
chatgpt-qq-chatgpt-1     |               │      │           │    │   └ <function Chatbot.ask_stream at 0x7f2381c9ed40>
chatgpt-qq-chatgpt-1     |               │      │           │    └ <EdgeGPT.EdgeGPT.Chatbot object at 0x7f2381494450>
chatgpt-qq-chatgpt-1     |               │      │           └ <adapter.ms.bing.BingAdapter object at 0x7f2381c48610>
chatgpt-qq-chatgpt-1     |               │      └ '\n![image0](https://tse2.mm.bing.net/th/id/OIG.kTAC0UbLZoFp7fY9NMCj)\n![image1](https://tse3.mm.bing.net/th/id/OIG.jhTCXRHl9...
chatgpt-qq-chatgpt-1     |               └ False
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/site-packages/EdgeGPT/EdgeGPT.py", line 187, in ask_stream
chatgpt-qq-chatgpt-1     |     async for response in self.chat_hub.ask_stream(
chatgpt-qq-chatgpt-1     |               │           │    │        └ <function ChatHub.ask_stream at 0x7f2381c9e700>
chatgpt-qq-chatgpt-1     |               │           │    └ <EdgeGPT.chathub.ChatHub object at 0x7f238149b390>
chatgpt-qq-chatgpt-1     |               │           └ <EdgeGPT.EdgeGPT.Chatbot object at 0x7f2381494450>
chatgpt-qq-chatgpt-1     |               └ (False, '\n![image0](https://tse2.mm.bing.net/th/id/OIG.kTAC0UbLZoFp7fY9NMCj)\n![image1](https://tse3.mm.bing.net/th/id/OIG.j...
chatgpt-qq-chatgpt-1     |   File "/usr/local/lib/python3.11/site-packages/EdgeGPT/chathub.py", line 211, in ask_stream
chatgpt-qq-chatgpt-1     |     cache = response["item"]["messages"][1]["adaptiveCards"][0][
chatgpt-qq-chatgpt-1     |             └ {'type': 2, 'invocationId': '5', 'item': {'messages': [{'text': '帮我画一幅猫的画', 'author': 'user', 'from': {'id': '1A509F7B7E5D6E1...
chatgpt-qq-chatgpt-1     | 
chatgpt-qq-chatgpt-1     | KeyError: 'adaptiveCards'
chatgpt-qq-chatgpt-1     | 2023-08-08 12:30:21.046 | DEBUG    | platforms.onebot_bot:respond:112 - [OneBot] 尝试发送消息:出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚对话” 来回溯到上一条对话,你上一条说的我就当作没看见。
chatgpt-qq-chatgpt-1     | 原因:'adaptiveCards'
chatgpt-qq-gocqhttp-1    | [2023-08-08 20:30:21] [INFO]: 发送好友 2096295544(2096295544)  的消息: [{"type":  ... (-837073533) 
gig123554 commented 1 year ago

bing最近老是报这个错,根本用不了

Haibersut commented 1 year ago

bing现在不稳定,没办法

pipinstalljoey commented 1 year ago

8-9 突然又好了,正在考虑close issue

glaw1984 commented 1 year ago

出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。 'adaptiveCards'

glaw1984 commented 1 year ago

出现故障!如果这个问题持续出现,请和我说“重置会话” 来开启一段新的会话,或者发送 “回滚会话” 来回溯到上一条对话,你上一条说的我就当作没看见。 'messages'