INNER CODE UNIT · Python

say_hello

RMA-MUN/RAGNotebook · backend/main.py:79

async def say_hello(name: str):
    return {"message": f"Hello {name}"}

@app.get('/health')
async def health_check():
    return {"message": "The service is healthy"}


@app.on_event("startup")
async def startup_event():
    """应用启动时初始化会话管理器"""
    # 初始化数据库表结构(自动创建/迁移)
    await init_db()
    logger.info("数据库表结构初始化完成")

    # 确保测试用户存在
    await seed_test_user()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…