From 16f490567ef6d42d40d9044c132e10ebc78f1996 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Tue, 16 Jul 2024 10:33:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E7=9A=84=E5=88=86=E6=AE=B5=E7=BB=93=E6=9E=9C=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=EF=BC=8C=E4=B8=8D=E6=98=AF=E6=8C=89=E7=85=A7?= =?UTF-8?q?=E5=91=BD=E4=B8=AD=E9=AB=98=E4=BD=8E=E9=A1=BA=E5=BA=8F=E6=8E=92?= =?UTF-8?q?=E5=BA=8F[BUG]=20#746=20(#770)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit d554e0ae885bba67b7f775d4ef2826688891a272) --- .../search_dataset_node/impl/base_search_dataset_node.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py index 20e0af9fc..191b8c15b 100644 --- a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py +++ b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py @@ -40,6 +40,7 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode): return NodeResult({'paragraph_list': [], 'is_hit_handling_method': []}, {}) paragraph_list = self.list_paragraph(embedding_list, vector) result = [self.reset_paragraph(paragraph, embedding_list) for paragraph in paragraph_list] + result = sorted(result, key=lambda p: p.get('similarity'), reverse=True) return NodeResult({'paragraph_list': result, 'is_hit_handling_method_list': [row for row in result if row.get('is_hit_handling_method')], 'data': '\n'.join([paragraph.get('content') for paragraph in paragraph_list]),