From 0e08526428960eb23024a8002efcf139ab4fccb8 Mon Sep 17 00:00:00 2001 From: Jyong <76649700+JohnJyong@users.noreply.github.com> Date: Sat, 18 Nov 2023 17:06:28 +0800 Subject: [PATCH] fix hybrid search reranking check (#1563) Co-authored-by: jyong --- api/core/model_providers/model_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/model_providers/model_factory.py b/api/core/model_providers/model_factory.py index 3a4c422a839400..f663707b075553 100644 --- a/api/core/model_providers/model_factory.py +++ b/api/core/model_providers/model_factory.py @@ -155,7 +155,7 @@ def get_reranking_model(cls, :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: