init
This commit is contained in:
@@ -25,14 +25,15 @@ class SrApiQueryTool(BaseTool):
|
||||
|
||||
sql = data.get("sql")
|
||||
page = int(data.get("page", 1))
|
||||
rows = int(data.get("rows", 10))
|
||||
cfg = Config.get_section("sr_api")
|
||||
default_rows = int(cfg.get("default_rows", 1000))
|
||||
rows = int(data.get("rows", default_rows))
|
||||
order_by_select = bool(data.get("orderBySelect", True))
|
||||
timeout = float(data.get("timeout", 30))
|
||||
|
||||
if not sql:
|
||||
return "缺少 sql"
|
||||
|
||||
cfg = Config.get_section("sr_api")
|
||||
url = cfg.get("url")
|
||||
app_key = cfg.get("llzappkey")
|
||||
secret_key = cfg.get("llzsercret")
|
||||
@@ -66,14 +67,15 @@ class SrApiQueryTool(BaseTool):
|
||||
|
||||
sql = data.get("sql")
|
||||
page = int(data.get("page", 1))
|
||||
rows = int(data.get("rows", 10))
|
||||
cfg = Config.get_section("sr_api")
|
||||
default_rows = int(cfg.get("default_rows", 1000))
|
||||
rows = int(data.get("rows", default_rows))
|
||||
order_by_select = bool(data.get("orderBySelect", True))
|
||||
timeout = float(data.get("timeout", 30))
|
||||
|
||||
if not sql:
|
||||
return "缺少 sql"
|
||||
|
||||
cfg = Config.get_section("sr_api")
|
||||
url = cfg.get("url")
|
||||
app_key = cfg.get("llzappkey")
|
||||
secret_key = cfg.get("llzsercret")
|
||||
|
||||
Reference in New Issue
Block a user