INNER CODE UNIT · Python

lifespan

openchoreo/openchoreo · agents/sre-agent/src/main.py:30

async def lifespan(_app: FastAPI):
    logger.info("Initialising JWT validator...")
    get_jwt_validator()

    logger.info("Starting up: Testing LLM connection...")
    try:
        model = get_model()
        test_response = await model.ainvoke("Hello")
        logger.info("LLM test successful: %s", test_response.content[:50])
    except Exception as e:
        logger.error("LLM initialization failed: %s", e)
        raise RuntimeError(f"LLM initialization failed: {e}") from e

    logger.info("Initializing report backend...")
    try:
        report_backend = get_report_backend()
        await report_backend.initialize()
    except Exception as e:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…