Unverified Commit b5f93d06 authored by Lukas Kreussel's avatar Lukas Kreussel Committed by GitHub
Browse files

Only fail if logit_bias has actual values (#1045)

parent a5893696
...@@ -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")
......
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