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
d573aead
Unverified
Commit
d573aead
authored
Dec 20, 2024
by
Michael Goin
Committed by
GitHub
Dec 20, 2024
Browse files
[Bugfix] Don't log OpenAI field aliases as ignored (#11378)
Signed-off-by:
mgoin
<
michael@neuralmagic.com
>
parent
995f5623
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
vllm/entrypoints/openai/protocol.py
vllm/entrypoints/openai/protocol.py
+9
-1
No files found.
vllm/entrypoints/openai/protocol.py
View file @
d573aead
...
...
@@ -46,7 +46,15 @@ class OpenAIBaseModel(BaseModel):
@
classmethod
def
__log_extra_fields__
(
cls
,
data
):
if
isinstance
(
data
,
dict
):
extra_fields
=
data
.
keys
()
-
cls
.
model_fields
.
keys
()
# Get all class field names and their potential aliases
field_names
=
set
()
for
field_name
,
field
in
cls
.
model_fields
.
items
():
field_names
.
add
(
field_name
)
if
hasattr
(
field
,
'alias'
)
and
field
.
alias
:
field_names
.
add
(
field
.
alias
)
# Compare against both field names and aliases
extra_fields
=
data
.
keys
()
-
field_names
if
extra_fields
:
logger
.
warning
(
"The following fields were present in the request "
...
...
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