浏览代码

修改查询标签接口

yulongyan_citu 10 月之前
父节点
当前提交
35dea83093
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      interfaces/rocketmq.py

+ 3 - 4
interfaces/rocketmq.py

@@ -82,10 +82,9 @@ def query_graph():
 
 
         if description:
         if description:
             label_list = llm_client1(description)
             label_list = llm_client1(description)
-            if isinstance(label_list, list) and label_list:
-                if not label:
-                    label = []
-                label += label_list
+        # 如果 label_list 是非空列表,则将其与现有的 label 合并
+        if isinstance(label_list, list) and label_list:
+            label.extend(label_list)
 
 
         if type == 'person':
         if type == 'person':
             id_list = similar_seeker(label)
             id_list = similar_seeker(label)