[CI/Build] Fix pre-commit errors (#13696)

This commit is contained in:
Cyrus Leung
2025-02-22 16:31:26 +08:00
committed by GitHub
parent 105b8ce4c0
commit 7f6bae561c
6 changed files with 24 additions and 17 deletions

View File

@@ -523,7 +523,7 @@ class OpenAIServing:
return logprob.decoded_token
return tokenizer.decode(token_id)
def _is_model_supported(self, model_name) -> bool:
def _is_model_supported(self, model_name: Optional[str]) -> bool:
if not model_name:
return True
return self.models.is_base_model(model_name)

View File

@@ -358,7 +358,12 @@ class ServingScores(OpenAIServing):
request.truncate_prompt_tokens,
)
return self.request_output_to_rerank_response(
final_res_batch, request_id, self._get_model_name(request.model), documents, top_n)
final_res_batch,
request_id,
self._get_model_name(request.model),
documents,
top_n,
)
except asyncio.CancelledError:
return self.create_error_response("Client disconnected")
except ValueError as e: