新增DifyApi类以支持与Dify API的交互,包含文档上传、索引状态获取、数据集管理等功能。同时优化DifyCompareTest.py中的缺失槽位判断逻辑,
This commit is contained in:
@@ -572,9 +572,8 @@ content: "{content}"
|
||||
slot_info_data = json.loads(slot_info)
|
||||
else:
|
||||
slot_info_data = slot_info
|
||||
slot_missing = slot_info_data.get("slot_missing", None)
|
||||
slot_missing_str = "完整" if not slot_missing else "缺失"
|
||||
|
||||
slot_missing = slot_info_data.get("missing_slots", {})
|
||||
slot_missing_str = "完整" if len(slot_missing) == 0 else "缺失"
|
||||
# 返回结果
|
||||
return {
|
||||
"问题": query,
|
||||
|
||||
Reference in New Issue
Block a user