"""
API v1 Router
"""

from fastapi import APIRouter

from app.api.v1 import files, projects, chunks, questions, datasets, eval, models

api_router = APIRouter()

# Include sub-routers
api_router.include_router(projects.router, prefix="/projects", tags=["projects"])
# files, chunks, questions, datasets, eval 需要嵌套在 projects 下
# 通过 projects 路由中的子路由处理
api_router.include_router(files.router, prefix="/projects/{project_id}/files", tags=["files"])
api_router.include_router(chunks.router, prefix="/projects/{project_id}/chunks", tags=["chunks"])
api_router.include_router(questions.router, prefix="/projects/{project_id}/questions", tags=["questions"])
api_router.include_router(datasets.router, prefix="/projects/{project_id}/datasets", tags=["datasets"])
api_router.include_router(eval.router, prefix="/projects/{project_id}/eval", tags=["eval"])
api_router.include_router(models.router, prefix="/models", tags=["models"])
