新增DifyApi类以支持与Dify API的交互,包含文档上传、索引状态获取、数据集管理等功能。同时优化DifyCompareTest.py中的缺失槽位判断逻辑,

This commit is contained in:
2025-07-02 15:53:51 +08:00
parent d835439fea
commit b8ccdcf287
3 changed files with 482 additions and 4 deletions
+2 -3
View File
@@ -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,