From 144162797552ad900abd160ef3d0d4c8afe9f9ea Mon Sep 17 00:00:00 2001 From: zhaoqingang <zhaoqg0118@163.com> Date: 星期四, 07 十一月 2024 18:22:57 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/rag-gateway --- app/api/chat.py | 3 ++- app/api/excel.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/api/chat.py b/app/api/chat.py index f11b01e..b54db51 100644 --- a/app/api/chat.py +++ b/app/api/chat.py @@ -82,7 +82,8 @@ result = {"message": "鍐呴儴閿欒锛�" + answer, "type": "message"} else: # 姝e父杈撳嚭 answer = data.get("answer", "") - result = {"message": answer, "type": "message"} + reference = data.get("reference", {}) + result = {"message": answer, "type": "message", "reference": reference} await websocket.send_json(result) except json.JSONDecodeError: print(f"Error decode ragflow response: {text}") diff --git a/app/api/excel.py b/app/api/excel.py index 629866f..77ae5fd 100644 --- a/app/api/excel.py +++ b/app/api/excel.py @@ -77,9 +77,7 @@ data = await websocket.receive_text() try: if data == "\"鍚堝苟Excel\"": - clear_directory(EXCEL_FILES_PATH) output_file_path = run_conformity() - clear_directory(EXCEL_FILES_PATH) output_file_path = run_conformity() files = os.listdir(EXCEL_FILES_PATH) if files: -- Gitblit v1.8.0