Spaces:
Sleeping
Sleeping
| """Monitoring API router. | |
| GET /ai/v2/monitoring/model-health — returns status of all loaded models | |
| with metrics and prediction stats. | |
| """ | |
| from fastapi import APIRouter, Depends | |
| from app.api.v2.dependencies import get_monitoring_service | |
| from app.schemas.monitoring import MonitoringResponse | |
| from app.services.monitoring_service import MonitoringService | |
| router = APIRouter(prefix="/ai/v2", tags=["monitoring"]) | |
| async def get_model_health( | |
| service: MonitoringService = Depends(get_monitoring_service), | |
| ) -> MonitoringResponse: | |
| """Return health status of all registered models.""" | |
| return service.get_model_health() | |