fix get embedding model provider in empty dataset (#1986)

Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
Jyong
2024-01-10 20:48:16 +08:00
committed by GitHub
parent 0025ba4921
commit 24bdedf802
3 changed files with 28 additions and 14 deletions

View File

@@ -179,6 +179,8 @@ class ModelManager:
:param model: model name
:return:
"""
if not provider:
return self.get_default_model_instance(tenant_id, model_type)
provider_model_bundle = self._provider_manager.get_provider_model_bundle(
tenant_id=tenant_id,
provider=provider,