Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: init func (#13430)

Lynn02142578864d
diff --git a/agent/component/llm.py b/agent/component/llm.py
index f651fd5abd..24254ce20c 100644
--- a/agent/component/llm.py
+++ b/agent/component/llm.py
@@ -85,7 +85,7 @@ class LLM(ComponentBase):
def __init__(self, canvas, component_id, param: ComponentParamBase):
super().__init__(canvas, component_id, param)
- chat_model_config = get_model_config_by_type_and_name(self._canvas.get_tenant_id(), TenantLLMService.llm_id2llm_type(self._param.llm_id))
+ chat_model_config = get_model_config_by_type_and_name(self._canvas.get_tenant_id(), TenantLLMService.llm_id2llm_type(self._param.llm_id), self._param.llm_id)
self.chat_mdl = LLMBundle(self._canvas.get_tenant_id(), chat_model_config,
max_retries=self._param.max_retries,
retry_interval=self._param.delay_after_error)
diff --git a/api/db/init_data.py b/api/db/init_data.py
index 229d3ffc01..26f53051d7 100644
--- a/api/db/init_data.py
+++ b/api/db/init_data.py
@@ -314,7 +314,7 @@ def fix_empty_tenant_model_id():
if tenant_model:
update_dict.update({f"tenant_{key}": tenant_model.id})
if update_dict:
- update_dict += TenantService.update_by_id(tenant_dict["id"], update_dict)
+ update_cnt += TenantService.update_by_id(tenant_dict["id"], update_dict)
logging.info(f"Update {update_cnt} tenant_model_id in table tenant.")
logging.info("Fix empty tenant_model_id done.")