From f95f801f35aa201cbaffd7d881c07edc9398b570 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期一, 03 三月 2025 16:03:51 +0800
Subject: [PATCH] 增加外接知识库中转接口
---
app/api/chat.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/app/api/chat.py b/app/api/chat.py
index 16003e2..d4b6dae 100644
--- a/app/api/chat.py
+++ b/app/api/chat.py
@@ -71,11 +71,12 @@
chat_history = message.get('chatHistory', [])
message["role"] = "user"
if len(chat_history) == 0:
+ print("----------------------", token)
chat_history = await ragflow_service.get_session_history(token, chat_id)
if len(chat_history) == 0:
chat_history = await ragflow_service.set_session(token, agent_id,
message, chat_id, True)
- # print("chat_history------------------------", chat_history)
+ print("chat_history------------------------", chat_history)
if len(chat_history) == 0:
result = {"message": "鍐呴儴閿欒锛氬垱寤轰細璇濆け璐�", "type": "close"}
await websocket.send_json(result)
--
Gitblit v1.8.0