Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

[Bug]: bingAPI失效 #8

Open
3 tasks done
qq263424205 opened this issue Jul 13, 2023 · 8 comments
Open
3 tasks done

[Bug]: bingAPI失效 #8

qq263424205 opened this issue Jul 13, 2023 · 8 comments

Comments

@qq263424205
Copy link

在提交前请确保以下这些

  • Chat-API为最新版本
  • revChatGPT,EdgeGPT,BingImageCreator,GoogleBard,easy-ernie为最新版本
  • 在Issue无法找到它

操作系统

Windows

Python版本

3.10.11

问题

文心一言是正常的,但是bingAPI失效

触发

{"code": 500, "message": "未知错误", "data": null}

报错

No response

其他

No response

@XiaoXinYo
Copy link
Owner

方便提供报错信息吗?

@qq263424205
Copy link
Author

D:\Chat-API-main>main.py
�[32mINFO�[0m: Started server process [�[36m23076�[0m]
�[32mINFO�[0m: Waiting for application startup.
�[32mINFO�[0m: Application startup complete.
�[32mINFO�[0m: Uvicorn running on �[1mhttp://192.168.2.64:5000�[0m (Press CTRL+C to quit)
�[32mINFO�[0m: 192.168.2.64:59816 - "�[1mGET /bing/ask?question=%E6%82%A8%E5%A5%BD HTTP/1.1�[0m" �[32m200 OK�[0m
�[31mERROR�[0m: Exception in ASGI application
Traceback (most recent call last):
File "D:\python\lib\site-packages\anyio\streams\memory.py", line 98, in receive
return self.receive_nowait()
File "D:\python\lib\site-packages\anyio\streams\memory.py", line 93, in receive_nowait
raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\python\lib\site-packages\starlette\middleware\base.py", line 78, in call_next
message = await recv_stream.receive()
File "D:\python\lib\site-packages\anyio\streams\memory.py", line 118, in receive
raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\python\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 428, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:\python\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "D:\python\lib\site-packages\fastapi\applications.py", line 284, in call
await super().call(scope, receive, send)
File "D:\python\lib\site-packages\starlette\applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "D:\python\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "D:\python\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, _send)
File "D:\python\lib\site-packages\starlette\middleware\base.py", line 108, in call
response = await self.dispatch_func(request, call_next)
File "D:\Chat-API-main\main.py", line 56, in middleware
response = await call_next(request)
File "D:\python\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
raise app_exc
File "D:\python\lib\site-packages\starlette\middleware\base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "D:\python\lib\site-packages\starlette\middleware\cors.py", line 83, in call
await self.app(scope, receive, send)
File "D:\python\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "D:\python\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "D:\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in call
raise e
File "D:\python\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "D:\python\lib\site-packages\starlette\routing.py", line 718, in call
await route.handle(scope, receive, send)
File "D:\python\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "D:\python\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "D:\Chat-API-main\view\bing.py", line 103, in ask
data = await chatBot.ask(question, conversation_style=getStyleEnum(style), webpage_context=getPrompt(prompt))
File "D:\python\lib\site-packages\EdgeGPT\EdgeGPT.py", line 116, in ask
async for final, response in self.chat_hub.ask_stream(
File "D:\python\lib\site-packages\EdgeGPT\chathub.py", line 102, in ask_stream
async with connect(
File "D:\python\lib\site-packages\websockets\legacy\client.py", line 637, in aenter
return await self
File "D:\python\lib\site-packages\websockets\legacy\client.py", line 655, in await_impl_timeout
return await self.await_impl()
File "D:\python\lib\site-packages\websockets\legacy\client.py", line 662, in await_impl
await protocol.handshake(
File "D:\python\lib\site-packages\websockets\legacy\client.py", line 329, in handshake
raise InvalidStatusCode(status_code, response_headers)
websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 200
�[32mINFO�[0m: 192.168.2.64:59821 - "�[1mGET /favicon.ico HTTP/1.1�[0m" �[32m200 OK�[0m

@qq263424205
Copy link
Author

@XiaoXinYo

@XiaoXinYo
Copy link
Owner

参考 acheong08/EdgeGPT#584

@qq263424205
Copy link
Author

@XiaoXinYo 不是代码问题?

@XiaoXinYo
Copy link
Owner

XiaoXinYo commented Jul 13, 2023

d9135230968c6644863539f09dfe62d 应该是这样的,我直接调用EdgeGPT也无法使用

@qq263424205
Copy link
Author

@XiaoXinYo 那需要怎么解决?

@XiaoXinYo
Copy link
Owner

clash tun模式可能会有效,,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants