From 0cc80cb2ec0434ab82dbde531d8a0923f6e8bb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rog=C3=A9rio=20Chaves?= Date: Mon, 19 Aug 2024 14:20:57 +0200 Subject: [PATCH] Add healthcheck endpoint for langevals server, useful to see if its still running and keep it up --- langevals/server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/langevals/server.py b/langevals/server.py index a5f8ff8..3e10faf 100644 --- a/langevals/server.py +++ b/langevals/server.py @@ -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(