Files
AmazingDoc/app/main.py
Yaojia Wang 0a80400720 Init project
2025-08-11 00:07:41 +02:00

22 lines
711 B
Python

# app/main.py
import uvicorn
from fastapi import FastAPI
from .routers import documents # 导入我们新的文档路由
app = FastAPI(
title="混合模式文档处理AI Agent",
description="一个用于自动分类、提取和处理文档的AI应用框架。",
version="0.9.0", # 版本升级: 模块化API路由
)
# 将文档路由包含到主应用中
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__":
uvicorn.run("app.main:app", host="0.0.0.0", port=8000, reload=True)