Commit 4fb73db2 authored by Catheriany's avatar Catheriany
Browse files

issue/14: 修复非流式输出bug

parent 9f5e40d6
...@@ -274,8 +274,8 @@ async def chat_completions(request: Request): ...@@ -274,8 +274,8 @@ async def chat_completions(request: Request):
chat_stream(id_, data, request), media_type="text/event-stream" chat_stream(id_, data, request), media_type="text/event-stream"
) )
else: else:
return JSONResponse(chat(id_, data)) response = await chat(id_, data, request)
return JSONResponse(content=response)
if __name__ == "__main__": if __name__ == "__main__":
uvicorn.run(App, host="0.0.0.0", port=8000) uvicorn.run(App, host="0.0.0.0", port=8000)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment