Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fun:/v1/chat/completions , use "stream":"False". error ? why #2837

Open
sjyttkl opened this issue Dec 19, 2023 · 3 comments
Open

fun:/v1/chat/completions , use "stream":"False". error ? why #2837

sjyttkl opened this issue Dec 19, 2023 · 3 comments

Comments

@sjyttkl
Copy link

sjyttkl commented Dec 19, 2023

chat_completions [<Task pending name='Task-28' coro=<generate_completion() running at /usr/local/lib/python3.8/dist-packages/fastchat/serve/openai_api_server.py:650>>]
content {"text": "Internal Server Error", "error_code": 50001}
all_tasks ['{"text": "Internal Server Error", "error_code": 50001}']
INFO: 12.241.92.0:42862 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 276, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 84, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 163, in run_endpoint_function
return await dependant.call(**values)
File "/usr/local/lib/python3.8/dist-packages/fastchat/serve/openai_api_server.py", line 422, in create_chat_completion
if content["error_code"] != 0:
TypeError: string indices must be integers

@dachengai
Copy link

+1

@sjyttkl
Copy link
Author

sjyttkl commented Dec 29, 2023 via email

@qcoltma
Copy link

qcoltma commented Jan 22, 2024

升级python版本到10.x就行了 Sent from my iPhone

------------------ Original ------------------ From: 张大成 @.> Date: Fri, Dec 22, 2023 1:17 PM To: lm-sys/FastChat @.> Cc: xiaodongdong @.>, Author @.> Subject: Re: [lm-sys/FastChat] fun:/v1/chat/completions , use "stream":"False". error ? why (Issue #2837) +1 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

我也遇到了相同问题,我以为是fastchat目前不支持流式输出,现在python版本是10.0,难道稍微升级一下python就好了?

@zhouzaida zhouzaida mentioned this issue Jan 26, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants