mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-09 04:07:08 +08:00
bugfix: fix the bug that stream generate not work (#2756)
This commit is contained in:
parent
8a4358ecb5
commit
9e37266420
@ -66,7 +66,7 @@ async def generate(request: Request) -> Response:
|
|||||||
prompt + output.text for output in request_output.outputs
|
prompt + output.text for output in request_output.outputs
|
||||||
]
|
]
|
||||||
ret = {"text": text_outputs}
|
ret = {"text": text_outputs}
|
||||||
yield (json.dumps(ret) + "\0").encode("utf-8")
|
yield (json.dumps(ret) + "\n").encode("utf-8")
|
||||||
|
|
||||||
if stream:
|
if stream:
|
||||||
return StreamingResponse(stream_results())
|
return StreamingResponse(stream_results())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user