Add /health Endpoint for both Servers (#1540)

This commit is contained in:
Fluder-Paradyne
2023-11-01 22:59:44 +05:30
committed by GitHub
parent 5687d584fe
commit 7e90a2d117
2 changed files with 13 additions and 1 deletions

View File

@@ -17,6 +17,12 @@ app = FastAPI()
engine = None
@app.get("/health")
async def health() -> Response:
"""Health check."""
return Response(status_code=200)
@app.post("/generate")
async def generate(request: Request) -> Response:
"""Generate completion for the request.