Skip to content

Commit

Permalink
bugfix: fix the bug that stream generate not work (vllm-project#2756)
Browse files Browse the repository at this point in the history
Signed-off-by: Loc Huynh <[email protected]>
  • Loading branch information
caijizhuo authored and JC1DA committed Nov 11, 2024
1 parent 01b7daa commit acf9207
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vllm/entrypoints/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def stream_results() -> AsyncGenerator[bytes, None]:
prompt + output.text for output in request_output.outputs
]
ret = {"text": text_outputs}
yield (json.dumps(ret) + "\0").encode("utf-8")
yield (json.dumps(ret) + "\n").encode("utf-8")

if stream:
return StreamingResponse(stream_results())
Expand Down

0 comments on commit acf9207

Please sign in to comment.