From 1ab90de913405b45050e0f732a03004087134fda Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期一, 25 十一月 2024 11:11:04 +0800
Subject: [PATCH] 上传dify文件

---
 app/api/agent.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/app/api/agent.py b/app/api/agent.py
index 5e72c15..b8c1b9d 100644
--- a/app/api/agent.py
+++ b/app/api/agent.py
@@ -64,6 +64,12 @@
         result = [item.to_dict() for item in records]
         return ResponseList(code=200, msg="", data=result)
 
+    elif agent.agent_type == AgentType.DIFY:
+        offset = (page - 1) * limit
+        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)
+
     else:
         return ResponseList(code=200, msg="Unsupported agent type")
 

--
Gitblit v1.8.0