Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norm
vllm
Commits
b5f93d06
Unverified
Commit
b5f93d06
authored
Sep 15, 2023
by
Lukas Kreussel
Committed by
GitHub
Sep 14, 2023
Browse files
Only fail if logit_bias has actual values (#1045)
parent
a5893696
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
vllm/entrypoints/openai/api_server.py
vllm/entrypoints/openai/api_server.py
+2
-2
No files found.
vllm/entrypoints/openai/api_server.py
View file @
b5f93d06
...
@@ -196,7 +196,7 @@ async def create_chat_completion(request: ChatCompletionRequest,
...
@@ -196,7 +196,7 @@ async def create_chat_completion(request: ChatCompletionRequest,
if
error_check_ret
is
not
None
:
if
error_check_ret
is
not
None
:
return
error_check_ret
return
error_check_ret
if
request
.
logit_bias
is
not
None
:
if
request
.
logit_bias
is
not
None
and
len
(
request
.
logit_bias
)
>
0
:
# TODO: support logit_bias in vLLM engine.
# TODO: support logit_bias in vLLM engine.
return
create_error_response
(
HTTPStatus
.
BAD_REQUEST
,
return
create_error_response
(
HTTPStatus
.
BAD_REQUEST
,
"logit_bias is not currently supported"
)
"logit_bias is not currently supported"
)
...
@@ -379,7 +379,7 @@ async def create_completion(request: CompletionRequest, raw_request: Request):
...
@@ -379,7 +379,7 @@ async def create_completion(request: CompletionRequest, raw_request: Request):
return
create_error_response
(
HTTPStatus
.
BAD_REQUEST
,
return
create_error_response
(
HTTPStatus
.
BAD_REQUEST
,
"suffix is not currently supported"
)
"suffix is not currently supported"
)
if
request
.
logit_bias
is
not
None
:
if
request
.
logit_bias
is
not
None
and
len
(
request
.
logit_bias
)
>
0
:
# TODO: support logit_bias in vLLM engine.
# TODO: support logit_bias in vLLM engine.
return
create_error_response
(
HTTPStatus
.
BAD_REQUEST
,
return
create_error_response
(
HTTPStatus
.
BAD_REQUEST
,
"logit_bias is not currently supported"
)
"logit_bias is not currently supported"
)
...
...
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