refactor: fix linting errors

This commit is contained in:
Krrish Dholakia 2023-12-06 11:46:09 -08:00
parent f52a65d43b
commit 6d1a5089e3
2 changed files with 8 additions and 3 deletions

View file

@ -1175,6 +1175,11 @@ async def test_endpoint(request: Request):
async def health_endpoint(request: Request, model: Optional[str] = fastapi.Query(None, description="Specify the model name (optional)")):
global llm_model_list
if llm_model_list is None:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail={"error": "Model list not initialized"},
)
healthy_endpoints, unhealthy_endpoints = await perform_health_check(llm_model_list, model)
return {