INNER CODE UNIT · Python
health_check
kaito-project/kaito · presets/ragengine/main.py:259
def health_check():
try:
if embedding_manager is None:
raise HTTPException(
status_code=500, detail="Embedding manager not initialized"
)
if rag_ops is None:
raise HTTPException(
status_code=500, detail="RAG operations not initialized"
)
return HealthStatus(status="Healthy")
except Exception as e:
logger.error("Health check failed", exc_info=True)
raise HTTPException(status_code=500, detail=str(e))