Open sjyttkl opened 11 months ago
+1
升级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: @.***>
升级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就好了?
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