Skip to content

Commit b396cb4

Browse files
authored
fix: only response [DONE] once when streaming response. (#378)
1 parent 1c395b4 commit b396cb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/entrypoints/openai/api_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ async def completion_stream_generator() -> AsyncGenerator[str, None]:
269269
finish_reason=output.finish_reason,
270270
)
271271
yield f"data: {response_json}\n\n"
272-
yield "data: [DONE]\n\n"
272+
yield "data: [DONE]\n\n"
273273

274274
# Streaming response
275275
if request.stream:
@@ -465,7 +465,7 @@ async def completion_stream_generator() -> AsyncGenerator[str, None]:
465465
finish_reason=output.finish_reason,
466466
)
467467
yield f"data: {response_json}\n\n"
468-
yield "data: [DONE]\n\n"
468+
yield "data: [DONE]\n\n"
469469

470470
# Streaming response
471471
if stream:

0 commit comments

Comments
 (0)