[Minor] Improve logging and rename the health check endpoint name (#1180)

This commit is contained in:
Lianmin Zheng
2024-08-21 19:24:36 -07:00
committed by GitHub
parent 83e23c69b3
commit 5623826f73
6 changed files with 21 additions and 30 deletions

View File

@@ -92,11 +92,15 @@ app = FastAPI()
tokenizer_manager = None
@app.get("/v1/health")
async def health(request: Request) -> Response:
"""
Generate 1 token to verify the health of the inference service.
"""
@app.get("/health")
async def health() -> Response:
"""Check the health of the http server."""
return Response(status_code=200)
@app.get("/health_generate")
async def health_generate(request: Request) -> Response:
"""Check the health of the inference server by generating one token."""
gri = GenerateReqInput(
text="s", sampling_params={"max_new_tokens": 1, "temperature": 0.7}
)
@@ -109,12 +113,6 @@ async def health(request: Request) -> Response:
return Response(status_code=503)
@app.get("/health")
async def health() -> Response:
"""Health check."""
return Response(status_code=200)
@app.get("/get_model_info")
async def get_model_info():
result = {