From 989d0848c0eb152757d3b97095182b9ef066273a Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 12 Sep 2024 14:13:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E4=B8=AD,=E5=87=BD=E6=95=B0=E5=BA=93=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9F=A5=E8=AF=86=E5=BA=93=E6=A3=80=E7=B4=A2=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search_dataset_node/impl/base_search_dataset_node.py | 7 ++++++- apps/common/constants/authentication_type.py | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 bc7e4c853..3113848e3 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 @@ -79,7 +79,12 @@ class BaseSearchDatasetNode(ISearchDatasetStepNode): **paragraph, 'similarity': find_embedding.get('similarity'), 'is_hit_handling_method': find_embedding.get('similarity') > paragraph.get( - 'directly_return_similarity') and paragraph.get('hit_handling_method') == 'directly_return' + 'directly_return_similarity') and paragraph.get('hit_handling_method') == 'directly_return', + 'update_time': paragraph.get('update_time').strftime("%Y-%m-%d %H:%M:%S"), + 'create_time': paragraph.get('create_time').strftime("%Y-%m-%d %H:%M:%S"), + 'id': str(paragraph.get('id')), + 'dataset_id': str(paragraph.get('dataset_id')), + 'document_id': str(paragraph.get('document_id')) } @staticmethod diff --git a/apps/common/constants/authentication_type.py b/apps/common/constants/authentication_type.py index 33163003e..83586ee3b 100644 --- a/apps/common/constants/authentication_type.py +++ b/apps/common/constants/authentication_type.py @@ -16,3 +16,5 @@ class AuthenticationType(Enum): APPLICATION_ACCESS_TOKEN = "APPLICATION_ACCESS_TOKEN" # key API API_KEY = "API_KEY" + # 第三方对接 + PLATFORM = 'PLATFORM'