From 2ab9af3b3865c123592d2ab3ed08af549bd5332c Mon Sep 17 00:00:00 2001 From: Jyong <76649700+JohnJyong@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:38:59 +0800 Subject: [PATCH] delete weight_type in knowledge retrieval node (#6892) --- api/core/workflow/nodes/knowledge_retrieval/entities.py | 2 -- .../nodes/knowledge_retrieval/knowledge_retrieval_node.py | 1 - 2 files changed, 3 deletions(-) diff --git a/api/core/workflow/nodes/knowledge_retrieval/entities.py b/api/core/workflow/nodes/knowledge_retrieval/entities.py index 5758b895f30cc9..7cf392277caad6 100644 --- a/api/core/workflow/nodes/knowledge_retrieval/entities.py +++ b/api/core/workflow/nodes/knowledge_retrieval/entities.py @@ -33,7 +33,6 @@ class WeightedScoreConfig(BaseModel): """ Weighted score Config. """ - weight_type: str vector_setting: VectorSetting keyword_setting: KeywordSetting @@ -49,7 +48,6 @@ class MultipleRetrievalConfig(BaseModel): reranking_model: Optional[RerankingModelConfig] = None weights: Optional[WeightedScoreConfig] = None - class ModelConfig(BaseModel): """ Model Config. diff --git a/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py b/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py index 7a2b3c85125df9..01bf6e16e6ebcd 100644 --- a/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py +++ b/api/core/workflow/nodes/knowledge_retrieval/knowledge_retrieval_node.py @@ -147,7 +147,6 @@ def _fetch_dataset_retriever(self, node_data: KnowledgeRetrievalNodeData, query: elif node_data.multiple_retrieval_config.reranking_mode == 'weighted_score': reranking_model = None weights = { - 'weight_type': node_data.multiple_retrieval_config.weights.weight_type, 'vector_setting': { "vector_weight": node_data.multiple_retrieval_config.weights.vector_setting.vector_weight, "embedding_provider_name": node_data.multiple_retrieval_config.weights.vector_setting.embedding_provider_name,