Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# src/api/routes/__init__.py
|
||||
"""API路由模块"""
|
||||
|
||||
from fastapi import APIRouter
|
||||
@@ -14,4 +13,4 @@ api_router.include_router(documents_router)
|
||||
api_router.include_router(knowledge_router)
|
||||
api_router.include_router(agent_router)
|
||||
|
||||
__all__ = ["api_router", "documents_router", "knowledge_router", "agent_router"]
|
||||
__all__ = ["api_router", "documents_router", "knowledge_router", "agent_router"]
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# src/api/routes/agent.py
|
||||
"""Agent API接口 - 问答对话接口"""
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Depends
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# src/api/routes/documents.py
|
||||
"""文档上传与处理接口"""
|
||||
|
||||
from fastapi import APIRouter, UploadFile, File, Form, HTTPException
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# src/api/routes/knowledge.py
|
||||
"""知识库检索接口"""
|
||||
|
||||
from fastapi import APIRouter, HTTPException
|
||||
|
||||
Reference in New Issue
Block a user