Explorar el Código

增加最低分阈值

luojunhui hace 2 semanas
padre
commit
debb504f74
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      applications/utils/milvus/search.py

+ 1 - 1
applications/utils/milvus/search.py

@@ -28,7 +28,7 @@ class MilvusBase:
                     for key, value in (hit.get("entity", {}) or {}).items()
                 },
             }
-            for hit in hits[0]
+            for hit in hits[0] if hit.distance >= 0.6
         ]