Skip to content

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

Fix: Fixed the issue that the agent list page failed to load #3827 (#3902)

balibabu311a475b6fc9
diff --git a/agent/canvas.py b/agent/canvas.py
index 72ab3c103e..41410e64e3 100644
--- a/agent/canvas.py
+++ b/agent/canvas.py
@@ -224,17 +224,16 @@ class Canvas(ABC):
for m in prepare2run([switch_out]):
yield {"content": m, "running_status": True}
except Exception as e:
- yield {"content": "*Exception*: {}".format(e), "running_status": True}
logging.exception("Canvas.run got exception")
+ raise e
continue
try:
for m in prepare2run(cpn["downstream"]):
yield {"content": m, "running_status": True}
except Exception as e:
- yield {"content": "*Exception*: {}".format(e), "running_status": True}
logging.exception("Canvas.run got exception")
- ran += 1
+ raise e
if ran >= len(self.path[-1]) and waiting:
without_dependent_checking = waiting
diff --git a/api/db/services/llm_service.py b/api/db/services/llm_service.py
index 128f154f2d..16fd42ca16 100644
--- a/api/db/services/llm_service.py
+++ b/api/db/services/llm_service.py
@@ -196,8 +196,7 @@ class TenantLLMService(CommonService):
else:
tenant_llms = cls.query(tenant_id=tenant_id, llm_name=llm_name)
if not tenant_llms:
- if not llm_factory: llm_factory = mdlnm
- num = cls.model.create(tenant_id=tenant_id, llm_factory=llm_factory, llm_name=llm_name, used_tokens=used_tokens)
+ return num
else:
tenant_llm = tenant_llms[0]
num = cls.model.update(used_tokens=tenant_llm.used_tokens + used_tokens)\