[Bugfix] fix missing 'finish_reason': null in streaming chat (#19662)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
@@ -873,7 +873,7 @@ class OpenAIServingChat(OpenAIServing):
|
|||||||
total_tokens=num_prompt_tokens + completion_tokens,
|
total_tokens=num_prompt_tokens + completion_tokens,
|
||||||
)
|
)
|
||||||
|
|
||||||
data = chunk.model_dump_json(exclude_none=True)
|
data = chunk.model_dump_json(exclude_unset=True)
|
||||||
yield f"data: {data}\n\n"
|
yield f"data: {data}\n\n"
|
||||||
|
|
||||||
# once the final token is handled, if stream_options.include_usage
|
# once the final token is handled, if stream_options.include_usage
|
||||||
|
|||||||
Reference in New Issue
Block a user