language models and set defaults are updated

This commit is contained in:
2025-01-28 17:11:59 +03:00
parent c0bd9c1685
commit 5d3f946642
34 changed files with 638 additions and 126 deletions

View File

@@ -65,7 +65,9 @@ def setup_exception_handlers(app: FastAPI) -> None:
"""
custom_exception_handler = HTTPExceptionApiHandler(response_model=JSONResponse)
app.add_exception_handler(ValidationError, validation_exception_handler)
app.add_exception_handler(HTTPExceptionApi, custom_exception_handler.handle_exception)
app.add_exception_handler(
HTTPExceptionApi, custom_exception_handler.handle_exception
)
app.add_exception_handler(Exception, generic_exception_handler)

View File

@@ -16,16 +16,6 @@ from Events.Engine.set_defaults.setClusters import (
routers: Optional[PrepareRouting] = None
# async def health_check(request: Request):
# """Default health check endpoint."""
# return {"status": "healthy", "message": "Service is running"}
#
#
# async def ping_test(request: Request, service_name: str = "base-router"):
# """Default ping test endpoint."""
# return {"ping": "pong", "service": service_name}
def get_all_routers() -> PrepareRouting:
"""
Get all routers and protected routes from route configurations.
@@ -41,3 +31,13 @@ def get_all_routers() -> PrepareRouting:
prepare_events = PrepareEvents(cluster_controller_group=cluster_list)
SetItems2Redis(prepare_events=prepare_events)
return prepare_routing
# async def health_check(request: Request):
# """Default health check endpoint."""
# return {"status": "healthy", "message": "Service is running"}
#
#
# async def ping_test(request: Request, service_name: str = "base-router"):
# """Default ping test endpoint."""
# return {"ping": "pong", "service": service_name}