Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
16620f43
Unverified
Commit
16620f43
authored
Jul 07, 2024
by
kczimm
Committed by
GitHub
Jul 08, 2024
Browse files
do not exclude `object` field in CompletionStreamResponse (#6196)
parent
3b08fe2b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/entrypoints/openai/serving_completion.py
vllm/entrypoints/openai/serving_completion.py
+2
-2
No files found.
vllm/entrypoints/openai/serving_completion.py
View file @
16620f43
...
@@ -301,7 +301,7 @@ class OpenAIServingCompletion(OpenAIServing):
...
@@ -301,7 +301,7 @@ class OpenAIServingCompletion(OpenAIServing):
else
:
else
:
chunk
.
usage
=
None
chunk
.
usage
=
None
response_json
=
chunk
.
model_dump_json
(
exclude_unset
=
Tru
e
)
response_json
=
chunk
.
model_dump_json
(
exclude_unset
=
Fals
e
)
yield
f
"data:
{
response_json
}
\n\n
"
yield
f
"data:
{
response_json
}
\n\n
"
if
(
request
.
stream_options
if
(
request
.
stream_options
...
@@ -314,7 +314,7 @@ class OpenAIServingCompletion(OpenAIServing):
...
@@ -314,7 +314,7 @@ class OpenAIServingCompletion(OpenAIServing):
usage
=
usage
,
usage
=
usage
,
)
)
final_usage_data
=
(
final_usage_chunk
.
model_dump_json
(
final_usage_data
=
(
final_usage_chunk
.
model_dump_json
(
exclude_unset
=
Tru
e
,
exclude_none
=
True
))
exclude_unset
=
Fals
e
,
exclude_none
=
True
))
yield
f
"data:
{
final_usage_data
}
\n\n
"
yield
f
"data:
{
final_usage_data
}
\n\n
"
except
ValueError
as
e
:
except
ValueError
as
e
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment