fix economy index search in workflow (#3205)

This commit is contained in:
Jyong 2024-04-09 13:20:51 +08:00 committed by GitHub
parent f514fd2182
commit 84d7cbf916
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -242,7 +242,10 @@ class KnowledgeRetrievalNode(BaseNode):
# get top k # get top k
top_k = retrieval_model_config['top_k'] top_k = retrieval_model_config['top_k']
# get retrieval method # get retrieval method
retrival_method = retrieval_model_config['search_method'] if dataset.indexing_technique == "economy":
retrival_method = 'keyword_search'
else:
retrival_method = retrieval_model_config['search_method']
# get reranking model # get reranking model
reranking_model=retrieval_model_config['reranking_model'] \ reranking_model=retrieval_model_config['reranking_model'] \
if retrieval_model_config['reranking_enable'] else None if retrieval_model_config['reranking_enable'] else None