chatgpt-mirai-qq-bot icon indicating copy to clipboard operation
chatgpt-mirai-qq-bot copied to clipboard

[BUG] new bing无法使用

Open hujiayucc opened this issue 1 year ago • 3 comments

提交 issue 前,请先确认:

  • [x] 我已看过 FAQ,此问题不在列表中
  • [x] 我已看过其他 issue,他们不能解决我的问题
  • [x] 我认为这不是 Mirai 或者 OpenAI 的 BUG

表现
使用new bing聊天报错

运行环境:

  • 操作系统:Windows
  • 项目版本:2.2.0
__main__:request:210 -
Traceback (most recent call last):

  File "D:\ChatGPT\chatgpt\python3.9\lib\site-packages\websockets\legacy\client.py", line 663, in __await_impl__
    _transport, _protocol = await self._create_connection()
                                  │    └ functools.partial(<bound method BaseEventLoop.create_connection of <ProactorEventLoop running=True closed=False debug=False>>...
                                  └ <websockets.legacy.client.Connect object at 0x00000284700ACD30>

  File "asyncio\base_events.py", line 1050, in create_connection
    except Exception:

  File "asyncio\base_events.py", line 961, in _connect_sock
    if handler is not None and not callable(handler):

  File "asyncio\proactor_events.py", line 703, in sock_connect

asyncio.exceptions.CancelledError


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "asyncio\tasks.py", line 490, in wait_for
    future = futures.Future(loop=loop)
             │       │           └ <ProactorEventLoop running=True closed=False debug=False>
             │       └ <class '_asyncio.Future'>
             └ <module 'asyncio.futures' from 'D:\\ChatGPT\\chatgpt\\python3.9\\python39.zip\\asyncio\\futures.pyc'>

asyncio.exceptions.CancelledError


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "D:\ChatGPT\chatgpt\bot.py", line 324, in <module>
    app.launch_blocking()
    │   └ <classmethod object at 0x000002846EF05AF0>
    └ <graia.ariadne.app.Ariadne object at 0x00000284457292B0>

  File "D:\ChatGPT\chatgpt\python3.9\lib\site-packages\graia\ariadne\app.py", line 312, in launch_blocking
    cls.launch_manager.launch_blocking(loop=cls.service.loop, stop_signal=stop_signals)
    │   │              │                    │   │       │                 └ (<Signals.SIGINT: 2>,)
    │   │              │                    │   │       └ <property object at 0x000002846EF09090>
    │   │              │                    │   └ <graia.ariadne.service.ElizabethService object at 0x000002844558BF70>
    │   │              │                    └ <class 'graia.ariadne.app.Ariadne'>
    │   │              └ <function Launart.launch_blocking at 0x000002846EBF3700>
    │   └ <launart.manager.Launart object at 0x00000284702E3C70>
    └ <class 'graia.ariadne.app.Ariadne'>

  File "D:\ChatGPT\chatgpt\python3.9\lib\site-packages\launart\manager.py", line 494, in launch_blocking
    loop.run_until_complete(launch_task)
    │    │                  └ <Task pending name='amnesia-launch' coro=<Launart.launch() running at D:\ChatGPT\chatgpt\python3.9\lib\site-packages\launart\...
    │    └ <function BaseEventLoop.run_until_complete at 0x00000284473DCCA0>
    └ <ProactorEventLoop running=True closed=False debug=False>

  File "asyncio\base_events.py", line 634, in run_until_complete
    ', '.join(str(exc) for exc in exceptions)))
                                  └ <module 'asyncio.exceptions' from 'D:\\ChatGPT\\chatgpt\\python3.9\\python39.zip\\asyncio\\exceptions.pyc'>

  File "asyncio\windows_events.py", line 321, in run_forever

  File "asyncio\base_events.py", line 601, in run_forever
    exc.errno, 'error while '

  File "asyncio\base_events.py", line 1905, in _run_once

  File "asyncio\events.py", line 80, in _run
    self._loop = loop
    │    └ <member '_loop' of 'Handle' objects>
    └ <Handle <TaskWakeupMethWrapper object at 0x00000284700ACBE0>(<Future finished result=None>)>

> File "D:\ChatGPT\chatgpt\bot.py", line 177, in request
    async for rendered in task:
                          └ <async_generator object ConversationContext.ask at 0x000002847001CE50>

  File "D:\ChatGPT\chatgpt\conversation.py", line 84, in ask
    async for item in self.adapter.ask(prompt):
                      │    │       │   └ 'bing 重置会话'
                      │    │       └ <function BingAdapter.ask at 0x000002846F97AA60>
                      │    └ <adapter.ms.bing.BingAdapter object at 0x0000028470070520>
                      └ <conversation.ConversationContext object at 0x00000284700703A0>

  File "D:\ChatGPT\chatgpt\adapter\ms\bing.py", line 45, in ask
    async for final, response in self.bot.ask_stream(prompt=prompt, conversation_style=self.conversation_style):
                                 │    │   │                 │                          │    └ <ConversationStyle.balanced: 'harmonyv3'>
                                 │    │   │                 │                          └ <adapter.ms.bing.BingAdapter object at 0x0000028470070520>
                                 │    │   │                 └ 'bing 重置会话'
                                 │    │   └ <function Chatbot.ask_stream at 0x000002846F2171F0>
                                 │    └ <EdgeGPT.Chatbot object at 0x0000028470070850>
                                 └ <adapter.ms.bing.BingAdapter object at 0x0000028470070520>

  File "D:\ChatGPT\chatgpt\python3.9\lib\site-packages\EdgeGPT.py", line 295, in ask_stream
    async for response in self.chat_hub.ask_stream(
                          │    │        └ <function ChatHub.ask_stream at 0x000002846F279EE0>
                          │    └ <EdgeGPT.ChatHub object at 0x000002846F7FB430>
                          └ <EdgeGPT.Chatbot object at 0x0000028470070850>

  File "D:\ChatGPT\chatgpt\python3.9\lib\site-packages\EdgeGPT.py", line 224, in ask_stream
    self.wss = await websockets.connect(
    │    │           │          └ <class 'websockets.legacy.client.Connect'>
    │    │           └ <module 'websockets.client' from 'D:\\ChatGPT\\chatgpt\\python3.9\\lib\\site-packages\\websockets\\client.py'>
    │    └ None
    └ <EdgeGPT.ChatHub object at 0x000002846F7FB430>

  File "D:\ChatGPT\chatgpt\python3.9\lib\site-packages\websockets\legacy\client.py", line 659, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
                 │       │        │    │                 │    └ 10
                 │       │        │    │                 └ <websockets.legacy.client.Connect object at 0x00000284700ACD30>
                 │       │        │    └ <function Connect.__await_impl__ at 0x000002846F279820>
                 │       │        └ <websockets.legacy.client.Connect object at 0x00000284700ACD30>
                 │       └ <function wait_for at 0x00000284473BFAF0>
                 └ <module 'asyncio' from 'D:\\ChatGPT\\chatgpt\\python3.9\\python39.zip\\asyncio\\__init__.pyc'>

  File "asyncio\tasks.py", line 492, in wait_for
    future._set_result_unless_cancelled, result)

asyncio.exceptions.TimeoutError

hujiayucc avatar Mar 06 '23 07:03 hujiayucc

看样子是没连上 new bing 的服务器

lss233 avatar Mar 06 '23 10:03 lss233

看样子是没连上 new bing 的服务器

Edge上可以正常使用

hujiayucc avatar Mar 06 '23 11:03 hujiayucc

有没有一种可能是你的 Edge 走了梯子,但是程序没走呢?

lss233 avatar Mar 06 '23 17:03 lss233

我全局代理也报这个错

1294334954 avatar Mar 09 '23 05:03 1294334954

你可以在你的梯子日志里确认一下,这个程序到底走没走你的代理。

lss233 avatar Mar 09 '23 05:03 lss233

你可以在你的梯子日志里确认一下,这个程序到底走没走你的代理。

1`30{QPF8546TTS7)7K)3OR 确实走了代理

1294334954 avatar Mar 09 '23 05:03 1294334954

你可以在你的梯子日志里确认一下,这个程序到底走没走你的代理。 1点的时候还能用,忽然就报这个错了,网页版我也试了,可以用

1294334954 avatar Mar 09 '23 05:03 1294334954

看样子是没连上 new bing 的服务器

Edge上可以正常使用

请问作者解决这个问题了吗

1294334954 avatar Mar 09 '23 05:03 1294334954

看样子是没连上 new bing 的服务器

Edge上可以正常使用

请问作者解决这个问题了吗

解决了

hujiayucc avatar Mar 09 '23 12:03 hujiayucc