| | |
| | | from app.api.excel import router as excel_router |
| | | from app.api.files import router as files_router |
| | | from app.api.knowledge import knowledge_router |
| | | from app.api.llm import llm_router |
| | | from app.api.organization import dept_router |
| | | from app.api.public_api import public_api |
| | | from app.api.report import router as report_router |
| | | from app.api.resource import menu_router |
| | | from app.api.sync_data import sync_router |
| | | # from app.api.sync_data import sync_router |
| | | from app.api.user import user_router |
| | | from app.api.group import group_router |
| | | from app.api.role import role_router |
| | |
| | | # 在应用关闭时执行清理操作(如果需要) |
| | | pass |
| | | |
| | | init_db() |
| | | # init_db() |
| | | app = FastAPI( |
| | | title="basic_rag_gateway", |
| | | version="0.1", |
| | |
| | | app.include_router(dept_router, prefix='/api/dept', tags=["dept"]) |
| | | app.include_router(menu_router, prefix='/api/menu', tags=["menu"]) |
| | | app.include_router(knowledge_router, prefix='/api/knowledge', tags=["knowledge"]) |
| | | app.include_router(llm_router, prefix='/api/llm', tags=["llm"]) |
| | | app.include_router(dialog_router, prefix='/api/dialog', tags=["dialog"]) |
| | | app.include_router(canvas_router, prefix='/api/canvas', tags=["canvas"]) |
| | | app.include_router(sync_router, prefix='/api/sync', tags=["sync"]) |
| | | # app.include_router(sync_router, prefix='/api/sync', tags=["sync"]) |
| | | app.include_router(public_api, prefix='/v1/api', tags=["public_api"]) |
| | | app.mount("/static", StaticFiles(directory="app/images"), name="static") |
| | | |
| | | if __name__ == "__main__": |