zhangqian
2024-10-16 3fc9f4f33cf90610c71a1de7b00db0f82b988e98
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()