main.py 340 B

12345678910111213141516
  1. from fastapi import FastAPI
  2. from app.api import health
  3. app = FastAPI(title="cfc-langgraph", version="0.1.0")
  4. app.include_router(health.router)
  5. @app.on_event("startup")
  6. async def startup():
  7. pass # 后续 Phase 在此初始化 RAG / Agent
  8. @app.on_event("shutdown")
  9. async def shutdown():
  10. pass # 后续 Phase 在此清理资源