Skip to content

Commit

Permalink
Add healthcheck endpoint for langevals server, useful to see if its s…
Browse files Browse the repository at this point in the history
…till running and keep it up
  • Loading branch information
rogeriochaves committed Aug 19, 2024
1 parent 2550756 commit 0cc80cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions langevals/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ async def evaluate(
create_evaluator_routes(evaluator_cls)


@app.get("/healthcheck")
async def healthcheck():
return {"status": "healthy"}


@app.exception_handler(ValidationError)
async def validation_exception_handler(request: Request, exc: ValidationError):
raise HTTPException(
Expand Down

0 comments on commit 0cc80cb

Please sign in to comment.