From 56d8dce48022692c5a7541114ef84f4fa395ff9d Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期二, 26 十一月 2024 11:22:49 +0800
Subject: [PATCH] dify images 问题

---
 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