mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-15 00:05:48 +08:00
Only fail if logit_bias has actual values (#1045)
This commit is contained in:
parent
a58936966f
commit
b5f93d0631
@ -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):
|
|||||||
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")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user