From 572e8580e498a391c10a7f923c465e3c7089d44b Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期三, 23 十月 2024 21:21:54 +0800 Subject: [PATCH] 文件上传问题修改 --- app/api/agent.py | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/app/api/agent.py b/app/api/agent.py index 2056aec..919eddb 100644 --- a/app/api/agent.py +++ b/app/api/agent.py @@ -16,16 +16,6 @@ router = APIRouter() -# Pydantic 妯″瀷鐢ㄤ簬鍝嶅簲 -class AgentResponse(BaseModel): - id: str - name: str - agent_type: AgentType - - class Config: - orm_mode = True - - @router.get("/list", response_model=ResponseList) async def agent_list(db: Session = Depends(get_db)): agents = db.query(AgentModel).order_by(AgentModel.sort.asc()).all() @@ -62,7 +52,7 @@ @router.get("/get-chat-id/{agent_id}", response_model=Response) -async def agent_list(agent_id: str, db: Session = Depends(get_db)): +async def get_chat_id(agent_id: str, db: Session = Depends(get_db)): agent = db.query(AgentModel).filter(AgentModel.id == agent_id).first() if not agent: return Response(code=404, msg="Agent not found") -- Gitblit v1.8.0