优化DifyQueryRetrieval和ModelTool中的请求超时设置,调整DifyExporter类中的分类逻辑,移除无用字段,更新词条处理逻辑,
This commit is contained in:
@@ -117,9 +117,14 @@ class DifyExporter:
|
||||
intent_result = json.loads(intent_node_execution_info[0]["outputs"])
|
||||
vertical_classification = intent_result.get("vertical_classification", "")
|
||||
sub_classification = intent_result.get("sub_classification", "")
|
||||
if vertical_classification == "固定话术类":
|
||||
if sub_classification == "固定话术类":
|
||||
return "使用固定话术"
|
||||
|
||||
worker_node_execution_info = [node_execution_info for node_execution_info in msg_debug_info['workflow_node_executions_info']
|
||||
if node_execution_info["title"] == "检索工单数据"]
|
||||
if len(worker_node_execution_info) != 0:
|
||||
return "检索工单"
|
||||
|
||||
return ""
|
||||
|
||||
def get_node_info_by_title(self, workflow_node_executions_info:list, title:str) -> dict:
|
||||
@@ -198,13 +203,12 @@ class DifyExporter:
|
||||
return None
|
||||
|
||||
wiki_list = self.get_wiki_list(msg_debug_info)
|
||||
# 获取备注
|
||||
remark = self.get_remark(msg_debug_info)
|
||||
|
||||
wiki_list = list(set(wiki_list))
|
||||
wiki_list_str = "\n".join(wiki_list)
|
||||
if wiki_list_str == "":
|
||||
wiki_list_str = "无"
|
||||
if len(wiki_list) ==0:
|
||||
wiki_list_str = self.get_remark(msg_debug_info)
|
||||
else:
|
||||
wiki_list = list(set(wiki_list))
|
||||
wiki_list_str = "\n".join(wiki_list)
|
||||
rating = self.dify_pgsql.get_message_rating(msg_id)
|
||||
# 直接通过字典键获取query_type
|
||||
workflow_run_id = message['workflow_run_id']
|
||||
@@ -220,7 +224,6 @@ class DifyExporter:
|
||||
"评价": rating,
|
||||
"问题分类": query_type,
|
||||
"检索到的词条": wiki_list_str,
|
||||
"备注": remark
|
||||
}
|
||||
|
||||
def process_conversations(self):
|
||||
@@ -274,7 +277,7 @@ class DifyExporter:
|
||||
# 设置列的顺序
|
||||
columns_order = [
|
||||
"msg_id","当前软件", "提问", "回答", "提问人", "提问时间",
|
||||
"评价", "问题分类", "检索到的词条", "备注"
|
||||
"评价", "问题分类", "检索到的词条"
|
||||
]
|
||||
|
||||
# 确保所有列都存在,如果不存在则添加空列
|
||||
|
||||
Reference in New Issue
Block a user