xiaoxinyo / chat-webapi Goto Github PK
View Code? Open in Web Editor NEW一款基于Python-FastAPI框架,开发的多种Chat WebAPI程序.
License: MIT License
一款基于Python-FastAPI框架,开发的多种Chat WebAPI程序.
License: MIT License
Linux
3.10.9
请求 new bing , 服务端有时候报错:
response["item"]["messages"][-1]["contentOrigin"] == "Apology"
~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'messages'
正常请求ask 接口的时候
No response
No response
Windows
3.10.11
文心一言是正常的,但是bingAPI失效
{"code": 500, "message": "未知错误", "data": null}
No response
No response
请支持使用serverless部署(比如Vercel)
Windows
3.10
Traceback (most recent call last):
File "F:\Python\Python310\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "F:\Python\Python310\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\fastapi\applications.py", line 1115, in call
await super().call(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "F:\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, _send)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\base.py", line 108, in call
response = await self.dispatch_func(request, call_next)
File "D:\Chat-WebAPI-main\main.py", line 56, in middleware
response = await call_next(request)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
raise app_exc
File "F:\Python\Python310\lib\site-packages\starlette\middleware\base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\cors.py", line 83, in call
await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "F:\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "F:\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in call
raise e
File "F:\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\routing.py", line 718, in call
await route.handle(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "D:\Chat-WebAPI-main\view\bing.py", line 101, in ask
token, chatBot = chat_bot.generateChatBot('Bing')
File "D:\Chat-WebAPI-main\module\chat_bot.py", line 28, in generateChatBot
chatBot = EdgeGPT.EdgeGPT.Chatbot(proxy=config.PROXY, cookies=BING_COOKIE)
File "F:\Python\Python310\lib\site-packages\EdgeGPT\EdgeGPT.py", line 28, in init
self.chat_hub: ChatHub = ChatHub(
File "F:\Python\Python310\lib\site-packages\EdgeGPT\chathub.py", line 42, in init
conversation_signature=conversation.struct["conversationSignature"],
KeyError: 'conversationSignature'
post
http://127.0.0.1:222/bing/ask
{"question":"用我爱刘亦菲写首藏头诗"}
Traceback (most recent call last):
File "F:\Python\Python310\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "F:\Python\Python310\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\fastapi\applications.py", line 1115, in call
await super().call(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 184, in call
raise exc
File "F:\Python\Python310\lib\site-packages\starlette\middleware\errors.py", line 162, in call
await self.app(scope, receive, _send)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\base.py", line 108, in call
response = await self.dispatch_func(request, call_next)
File "D:\Chat-WebAPI-main\main.py", line 56, in middleware
response = await call_next(request)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
raise app_exc
File "F:\Python\Python310\lib\site-packages\starlette\middleware\base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\cors.py", line 83, in call
await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 79, in call
raise exc
File "F:\Python\Python310\lib\site-packages\starlette\middleware\exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "F:\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in call
raise e
File "F:\Python\Python310\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\routing.py", line 718, in call
await route.handle(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "F:\Python\Python310\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "D:\Chat-WebAPI-main\view\bing.py", line 101, in ask
token, chatBot = chat_bot.generateChatBot('Bing')
File "D:\Chat-WebAPI-main\module\chat_bot.py", line 28, in generateChatBot
chatBot = EdgeGPT.EdgeGPT.Chatbot(proxy=config.PROXY, cookies=BING_COOKIE)
File "F:\Python\Python310\lib\site-packages\EdgeGPT\EdgeGPT.py", line 28, in init
self.chat_hub: ChatHub = ChatHub(
File "F:\Python\Python310\lib\site-packages\EdgeGPT\chathub.py", line 42, in init
conversation_signature=conversation.struct["conversationSignature"],
KeyError: 'conversationSignature'
无
Windows
python3.10.11
ImportError: cannot import name 'ConversationStyle' from 'EdgeGPT' (D:\python\lib\site-packages\EdgeGPT_init_.py)
python main.py
D:\demo\Chat-API-main>python main.py
Traceback (most recent call last):
File "D:\demo\Chat-API-main\main.py", line 6, in
from view import chatgpt, bing, bard, ernie
File "D:\demo\Chat-API-main\view\bing.py", line 8, in
from EdgeGPT import ConversationStyle
ImportError: cannot import name 'ConversationStyle' from 'EdgeGPT' (D:\python\lib\site-packages\EdgeGPT_init_.py)
请问要怎么解决?
No response
Windows
3.11
bing api 发送请求,加上token参数,也无法连续对话
bing api 发送请求,加上token参数,也无法连续对话
No response
No response
你好,有没有计划加入对 https://xinghuo.xfyun.cn/desk 的支持
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.