重构后端成功

This commit is contained in:
2026-04-28 00:45:18 +08:00
parent dd17206e1f
commit 8b10ef5828
75 changed files with 244 additions and 16685 deletions

View File

@@ -17,12 +17,25 @@ for logger_name in ['uvicorn', 'uvicorn.access', 'fastapi']:
# backend/app/main.py
from fastapi import FastAPI
from .api.route import router
try:
from backend.api.route import router
except ImportError:
from api.route import router
app = FastAPI(title="LLM Workflow Engine")
# 注册路由
app.include_router(router, prefix="/api")
# 添加健康检查端点
@app.get("/health")
async def health_check():
return {"status": "healthy"}
# 添加根路径
@app.get("/")
async def root():
return {"message": "LLM Workflow Engine", "status": "running"}
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)