-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Please confirm before submission 在提交之前,请确认
- I have searched for existing issues search for existing issues, including closed ones.
我已经搜索了现有问题搜索现有问题,包括已关闭的问题。"
Dify version Dify版本
Version 1.10.1
db_query or db_query_pre_auth
Database Query (Pre-authorization) 数据库查询(预授权)
Plugin version 插件版本
0.0.10
database and version 数据库及版本
mysql 8.0
Problem description 问题描述
Issue Title
[Bug] SQL 查询插件调用触发 KeyError: 'db_properties'
Description
问题概述
调用 SQL 查询插件 sql_query_pre_auth 执行指定 SQL 语句时,工具返回 PluginInvokeError,核心错误为 KeyError: 'db_properties',导致 SQL 查询请求失败,无法获取目标数据。
复现步骤
- 构造如下工具调用请求(仅包含
query_sql和output_format参数):{ "sql_query_pre_auth": { "query_sql": "SELECT data_year, val FROM t_cw WHERE company_name = 'xx集团' AND index_name = '累计营业总收入' AND ((data_year BETWEEN 2021 AND 2024 AND data_month = 12) OR (data_year = 2025 AND data_month = 8));", "output_format": "markdown" } } - 发送请求至插件接口;
- 插件返回调用错误,错误信息如下:
json
{
"sql_query_pre_auth": "tool invoke error: req_id: f3bb3cb7b4 PluginInvokeError: {"args":{},"error_type":"KeyError","message":"'db_properties'"}"
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working