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 exesql re-generate SQL issue. (#4717)
Kevin Hu307717b045d3
diff --git a/agent/component/exesql.py b/agent/component/exesql.pyindex 265256124b..6664d9133d 100644--- a/agent/component/exesql.py+++ b/agent/component/exesql.py@@ -15,6 +15,8 @@#from abc import ABCimport re+from copy import deepcopy+import pandas as pdimport pymysqlimport psycopg2@@ -22,6 +24,7 @@ from agent.component import GenerateParam, Generateimport pyodbcimport logging+class ExeSQLParam(GenerateParam):"""Define the ExeSQL component parameters.@@ -137,7 +140,9 @@ class ExeSQL(Generate, ABC):## Answer only the modified SQL statement. Please do not give any explanation, just answer the code.'''self._param.prompt=prompt- response = Generate._run(self, [], **kwargs)+ kwargs_ = deepcopy(kwargs)+ kwargs_["stream"] = False+ response = Generate._run(self, [], **kwargs_)try:regenerated_sql = response.loc[0,"content"]return regenerated_sql