zhaoqingang
2024-11-22 87524b8bf9fc48cf7992cb06eac95306eeee2540
自研智能体会话列表排序
1个文件已修改
2 ■■■ 已修改文件
app/api/agent.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/api/agent.py
@@ -60,7 +60,7 @@
    elif agent.agent_type == AgentType.BASIC:
        offset = (page - 1) * limit
        records = db.query(SessionModel).filter(SessionModel.agent_id == agent_id, SessionModel.tenant_id==current_user.id).offset(offset).limit(limit).all()
        records = db.query(SessionModel).filter(SessionModel.agent_id == agent_id, SessionModel.tenant_id==current_user.id).order_by(SessionModel.create_date.desc()).offset(offset).limit(limit).all()
        result = [item.to_dict() for item in records]
        return ResponseList(code=200, msg="", data=result)