"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "3d02c92187044393d90cc4768f9d0a0939322833"
Unverified Commit 27ca23dc authored by Seonghyeon's avatar Seonghyeon Committed by GitHub
Browse files

Remove exclude_unset in streaming response (#3143)

parent 54d35447
...@@ -96,7 +96,7 @@ async def completion_stream_generator( ...@@ -96,7 +96,7 @@ async def completion_stream_generator(
logprobs=logprobs, logprobs=logprobs,
finish_reason=finish_reason, finish_reason=finish_reason,
) )
]).model_dump_json(exclude_unset=True) ]).model_dump_json()
yield f"data: {response_json}\n\n" yield f"data: {response_json}\n\n"
if output.finish_reason is not None: # return final usage if output.finish_reason is not None: # return final usage
...@@ -121,7 +121,7 @@ async def completion_stream_generator( ...@@ -121,7 +121,7 @@ async def completion_stream_generator(
) )
], ],
usage=final_usage, usage=final_usage,
).model_dump_json(exclude_unset=True) ).model_dump_json()
yield f"data: {response_json}\n\n" yield f"data: {response_json}\n\n"
yield "data: [DONE]\n\n" yield "data: [DONE]\n\n"
...@@ -306,7 +306,7 @@ class OpenAIServingCompletion(OpenAIServing): ...@@ -306,7 +306,7 @@ class OpenAIServingCompletion(OpenAIServing):
request, prompt=prompt) request, prompt=prompt)
generators.append( generators.append(
self.engine.generate(None, self.engine.generate(prompt,
sampling_params, sampling_params,
f"{request_id}-{i}", f"{request_id}-{i}",
prompt_token_ids=input_ids, prompt_token_ids=input_ids,
......
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