From 5e164882a1cf920871aba378e96829d528deed9d Mon Sep 17 00:00:00 2001 From: ouyangyouzhang Date: Tue, 15 Jul 2025 13:50:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=B9=E8=AF=9D=E5=88=B0?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=9A=84=E9=BB=98=E8=AE=A4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=EF=BC=8C=E4=BF=AE=E6=AD=A3=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E4=B8=BA=E2=80=9C2025=E5=B9=B41=E6=9C=88?= =?UTF-8?q?=E5=88=B06=E6=9C=88=E2=80=9D=EF=BC=8C=E5=B9=B6=E5=9C=A8DifyExpo?= =?UTF-8?q?rter=E7=B1=BB=E4=B8=AD=E6=96=B0=E5=A2=9E=E2=80=9C=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E8=BD=AF=E4=BB=B6=E2=80=9D=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rag2_0/demo/dialogue_to_workorder.py | 2 +- rag2_0/dify/export_new_dify.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rag2_0/demo/dialogue_to_workorder.py b/rag2_0/demo/dialogue_to_workorder.py index c731993..467446a 100755 --- a/rag2_0/demo/dialogue_to_workorder.py +++ b/rag2_0/demo/dialogue_to_workorder.py @@ -654,7 +654,7 @@ def main(): args = parse_arguments() # 设置默认文件路径 - conversation_excel_path = args.conversation_file or os.path.join('data', 'excel', '2025年1月到6月12号所有对话记录.xlsx') + conversation_excel_path = args.conversation_file or os.path.join('data', 'excel', '2025年1月到6月所有对话记录.xlsx') product_detail_excel_path = args.product_detail_file or os.path.join('data', 'excel', '产品详情_工单.xlsx') # 创建处理实例 diff --git a/rag2_0/dify/export_new_dify.py b/rag2_0/dify/export_new_dify.py index a821ccc..6385dce 100644 --- a/rag2_0/dify/export_new_dify.py +++ b/rag2_0/dify/export_new_dify.py @@ -184,6 +184,7 @@ class DifyExporter: msg_id = message["id"] msg_inputs = message["inputs"] user_name = msg_inputs.get("user_name", "") + current_softname = msg_inputs.get("current_softname", "") msg_query = message["query"] msg_answer = message["answer"] msg_answer = msg_answer.split("----------------------------------------")[0] @@ -212,6 +213,7 @@ class DifyExporter: return { "msg_id": msg_id, "提问": msg_query, + "当前软件": current_softname, "回答": msg_answer, "提问人": user_name, "提问时间": created_at, @@ -271,7 +273,7 @@ class DifyExporter: # 设置列的顺序 columns_order = [ - "msg_id", "提问", "回答", "提问人", "提问时间", + "msg_id","当前软件", "提问", "回答", "提问人", "提问时间", "评价", "问题分类", "检索到的词条", "备注" ] @@ -302,6 +304,7 @@ class DifyExporter: # 设置列宽 column_widths = { "msg_id": 15, + "当前软件": 15, "提问": 40, "回答": 60, "提问人": 15,