From 226202d6eee6480f3386c6295be26fad42940cc8 Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期五, 28 三月 2025 09:41:39 +0800 Subject: [PATCH] 知识库分享,历史记录文件 --- app/api/agent.py | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/api/agent.py b/app/api/agent.py index d5c5ea8..1d275bc 100644 --- a/app/api/agent.py +++ b/app/api/agent.py @@ -45,10 +45,10 @@ if agent_type == AgentType.RAGFLOW: ragflow_service = RagflowService(base_url=settings.fwr_base_url) try: - token = await get_ragflow_token(db, current_user.id) - result = await ragflow_service.get_chat_sessions(token, agent_id) + result = await get_session_history(db, current_user.id, agent_id, page, limit) if not result: - result = await get_session_history(db, current_user.id, agent_id, page, limit) + token = await get_ragflow_token(db, current_user.id) + result = await ragflow_service.get_chat_sessions(token, agent_id) except Exception as e: print(e) raise HTTPException(status_code=500, detail=str(e)) -- Gitblit v1.8.0