更新对话到工单的默认文件路径,修正日期范围为“2025年1月到6月”,并在DifyExporter类中新增“当前软件”字段
This commit is contained in:
@@ -654,7 +654,7 @@ def main():
|
|||||||
args = parse_arguments()
|
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')
|
product_detail_excel_path = args.product_detail_file or os.path.join('data', 'excel', '产品详情_工单.xlsx')
|
||||||
|
|
||||||
# 创建处理实例
|
# 创建处理实例
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ class DifyExporter:
|
|||||||
msg_id = message["id"]
|
msg_id = message["id"]
|
||||||
msg_inputs = message["inputs"]
|
msg_inputs = message["inputs"]
|
||||||
user_name = msg_inputs.get("user_name", "")
|
user_name = msg_inputs.get("user_name", "")
|
||||||
|
current_softname = msg_inputs.get("current_softname", "")
|
||||||
msg_query = message["query"]
|
msg_query = message["query"]
|
||||||
msg_answer = message["answer"]
|
msg_answer = message["answer"]
|
||||||
msg_answer = msg_answer.split("----------------------------------------")[0]
|
msg_answer = msg_answer.split("----------------------------------------")[0]
|
||||||
@@ -212,6 +213,7 @@ class DifyExporter:
|
|||||||
return {
|
return {
|
||||||
"msg_id": msg_id,
|
"msg_id": msg_id,
|
||||||
"提问": msg_query,
|
"提问": msg_query,
|
||||||
|
"当前软件": current_softname,
|
||||||
"回答": msg_answer,
|
"回答": msg_answer,
|
||||||
"提问人": user_name,
|
"提问人": user_name,
|
||||||
"提问时间": created_at,
|
"提问时间": created_at,
|
||||||
@@ -271,7 +273,7 @@ class DifyExporter:
|
|||||||
|
|
||||||
# 设置列的顺序
|
# 设置列的顺序
|
||||||
columns_order = [
|
columns_order = [
|
||||||
"msg_id", "提问", "回答", "提问人", "提问时间",
|
"msg_id","当前软件", "提问", "回答", "提问人", "提问时间",
|
||||||
"评价", "问题分类", "检索到的词条", "备注"
|
"评价", "问题分类", "检索到的词条", "备注"
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -302,6 +304,7 @@ class DifyExporter:
|
|||||||
# 设置列宽
|
# 设置列宽
|
||||||
column_widths = {
|
column_widths = {
|
||||||
"msg_id": 15,
|
"msg_id": 15,
|
||||||
|
"当前软件": 15,
|
||||||
"提问": 40,
|
"提问": 40,
|
||||||
"回答": 60,
|
"回答": 60,
|
||||||
"提问人": 15,
|
"提问人": 15,
|
||||||
|
|||||||
Reference in New Issue
Block a user