zhaoqingang
2024-11-07 144162797552ad900abd160ef3d0d4c8afe9f9ea
Merge branch 'master' of http://192.168.5.5:10010/r/rag-gateway
2个文件已修改
5 ■■■■■ 已修改文件
app/api/chat.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/api/excel.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/api/chat.py
@@ -82,7 +82,8 @@
                                    result = {"message": "内部错误:" + answer, "type": "message"}
                                else:  # 正常输出
                                    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}")
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: