This commit is contained in:
2025-08-11 14:20:56 +02:00
parent 0a80400720
commit f077c6351d
17 changed files with 165 additions and 248 deletions

View File

@@ -1,20 +1,18 @@
# app/main.py
import uvicorn
from fastapi import FastAPI
from .routers import documents # 导入我们新的文档路由
from .routers import documents
app = FastAPI(
title="混合模式文档处理AI Agent",
description="一个用于自动分类、提取和处理文档的AI应用框架。",
version="0.9.0", # 版本升级: 模块化API路由
title="Hybrid Mode Document Processing AI Agent",
description="An AI application framework for automatic document classification, extraction, and processing.",
version="0.9.0",
)
# 将文档路由包含到主应用中
app.include_router(documents.router)
@app.get("/", tags=["Root"])
async def read_root():
"""一个简单的根端点,用于检查服务是否正在运行。"""
return {"message": "Welcome to the Document Processing AI Agent API!"}
if __name__ == "__main__":