fix hybrid search reranking check (#1563)

Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
Jyong 2023-11-18 17:06:28 +08:00 committed by GitHub
parent 888e8c6dac
commit 0e08526428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ class ModelFactory:
:param model_name:
:return:
"""
if model_provider_name is None and model_name is None:
if (model_provider_name is None or len(model_provider_name) == 0) and (model_name is None or len(model_name) == 0):
default_model = cls.get_default_model(tenant_id, ModelType.RERANKING)
if not default_model: