RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
Fix:valueERROR when file is optional but not exist value (#9414)
Popmioe845d5f9f85c
diff --git a/agent/component/begin.py b/agent/component/begin.pyindex d65a698faa..159f0f5d75 100644--- a/agent/component/begin.py+++ b/agent/component/begin.py@@ -39,7 +39,10 @@ class Begin(UserFillUp):def _invoke(self, **kwargs):for k, v in kwargs.get("inputs", {}).items():if isinstance(v, dict) and v.get("type", "").lower().find("file") >=0:- v = self._canvas.get_files([v["value"]])+ if v.get("optional") and v.get("value", None) is None:+ v = None+ else:+ v = self._canvas.get_files([v["value"]])else:v = v.get("value")self.set_output(k, v)