mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: add data type invoke (#5126)
### What problem does this PR solve? ``` Invoke agent To be able to interact dynamically with the API, there is a customizable Data Type JSON or FormData, the default is JSON ``` ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
@ -79,7 +79,6 @@ class ExeSQL(Generate, ABC):
|
||||
ans = self.get_input()
|
||||
ans = "".join([str(a) for a in ans["content"]]) if "content" in ans else ""
|
||||
ans = self._refactor(ans)
|
||||
logging.info("db_type: ", self._param.db_type)
|
||||
if self._param.db_type in ["mysql", "mariadb"]:
|
||||
db = pymysql.connect(db=self._param.database, user=self._param.username, host=self._param.host,
|
||||
port=self._param.port, password=self._param.password)
|
||||
@ -128,7 +127,6 @@ class ExeSQL(Generate, ABC):
|
||||
single_sql = self._refactor(single_sql)
|
||||
if self._loop > self._param.loop:
|
||||
sql_res.append({"content": "Can't query the correct data via SQL statement."})
|
||||
# raise Exception("Maximum loop time exceeds. Can't query the correct data via SQL statement.")
|
||||
db.close()
|
||||
if not sql_res:
|
||||
return ExeSQL.be_output("")
|
||||
|
||||
Reference in New Issue
Block a user