Skip to content

Commit dffe222

Browse files
authored
Merge pull request #24 from yanbeipang/feat/tool_paramater
update README
2 parents 283e536 + 049347e commit dffe222

File tree

3 files changed

+98
-77
lines changed

3 files changed

+98
-77
lines changed

doc/README-zh-cn.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,24 @@ CONNECTION_STRING = ecommerce@10.20.30.40:3306
9696
---
9797

9898
## 工具清单
99-
| 工具名称 | 描述 | 适用模式 |
100-
|------------------|-------------------------------|----------------------|
101-
| addInstance | 将阿里云实例添加到 DMS。 | 多实例模式 |
102-
| listInstances | 搜索DMS中的实例列表。 | 多实例模式 |
103-
| getInstance | 根据 host 和 port 获取实例详细信息。 | 多实例模式 |
104-
| searchDatabase | 根据 schemaName 搜索数据库。 | 多实例模式 |
105-
| getDatabase | 获取特定数据库的详细信息。 | 多实例模式 |
106-
| listTable | 搜索指定数据库下的数据表。 | 多实例模式 & 单数据库模式 |
107-
| getTableDetailInfo | 获取特定数据库表的详细信息。 | 多实例模式 & 单数据库模式 |
108-
| executeScript | 执行 SQL 脚本并返回结果。 | 多实例模式 & 单数据库模式 |
109-
| nl2sql | 将自然语言问题转换为 SQL 查询。 | 多实例模式 |
110-
| askDatabase | 自然语言查询数据库(NL2SQL + 执行 SQL)。 | 单数据库模式 |
111-
| configureDtsJob | 配置DTS迁移任务 | 多实例模式 |
112-
| startDtsJob | 启动DTS迁移任务 | 多实例模式 |
113-
| getDtsJob | 查看DTS迁移任务详情 | 多实例模式 |
99+
| 工具名称 | 描述 | 适用模式 |
100+
|--------------------|----------------------------|----------------------|
101+
| addInstance | 将阿里云实例添加到 DMS | 多实例模式 |
102+
| listInstances | 搜索DMS中的实例列表 | 多实例模式 |
103+
| getInstance | 根据 host 和 port 获取实例详细信息 | 多实例模式 |
104+
| searchDatabase | 根据 schemaName 搜索数据库 | 多实例模式 |
105+
| getDatabase | 获取特定数据库的详细信息 | 多实例模式 |
106+
| listTable | 搜索指定数据库下的数据表 | 多实例模式 & 单数据库模式 |
107+
| getTableDetailInfo | 获取特定数据库表的详细信息 | 多实例模式 & 单数据库模式 |
108+
| executeScript | 执行 SQL 脚本并返回结果 | 多实例模式 & 单数据库模式 |
109+
| createDataChangeOrder | 创建数据变更工单 | 多实例模式 & 单数据库模式 |
110+
| getOrderInfo | 获取工单详情 | 多实例模式 & 单数据库模式 |
111+
| submitOrderApproval | 提交工单审批 | 多实例模式 & 单数据库模式 |
112+
| generateSql | 将自然语言问题转换为 SQL 查询 | 多实例模式 |
113+
| askDatabase | 自然语言查询数据库(NL2SQL + 执行 SQL) | 单数据库模式 |
114+
| fixSql | SQL修复 | 多实例模式 & 单数据库模式 |
115+
| answerSqlSyntax | SQL语法回答 | 多实例模式 & 单数据库模式 |
116+
| optimizeSql | SQL优化 | 多实例模式 & 单数据库模式 |
114117

115118
<p> 详细工具列表请查阅:<a href="/doc/Tool-List-cn.md">工具清单</a><br></p>
116119

doc/Tool-List-cn.md

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -54,52 +54,59 @@
5454
- **database_id** (字符串, 必需): DMS 数据库 ID,可通过 getDatabase 工具获取。
5555
- **script** (字符串, 必需): 要执行的 SQL 脚本内容。
5656

57+
#### createDataChangeOrder:在 DMS 中创建数据变更工单。
58+
59+
- **database_id** (字符串, 必需): DMS 数据库 ID,可通过 getDatabase 工具获取。
60+
- **script** (字符串, 必需): 要执行的 SQL 脚本内容。
61+
62+
#### getOrderInfo:获取 DMS 工单详情。
63+
64+
- **order_id** (字符串, 必需): DMS 中的工单ID。
65+
66+
#### submitOrderApproval:提交 DMS 工单审批。
67+
68+
- **order_id** (字符串, 必需): DMS 中的工单ID。
69+
70+
5771
---
5872

5973
### NL2SQL 相关
6074

61-
#### nl2sql:将自然语言问题转换为可执行的 SQL 查询。
75+
#### generateSql:将自然语言问题转换为可执行的 SQL 查询。
6276

6377
- **question** (字符串, 必需): 需要转换为 SQL 的自然语言问题。
6478
- **database_id** (整数, 必需): DMS 数据库 ID,可通过 getDatabase 工具获取。
6579
- **knowledge** (字符串, 可选): 用于辅助 SQL 生成的额外上下文或数据库知识。
6680
- **model** (字符串, 可选): 指定的大模型类型,目前可使用通义千问系列的模型。
6781

6882

69-
#### askDatabase: 通过自然语言问题直接获取数据库执行结果
83+
#### askDatabase: 通过自然语言问题直接获取数据库执行结果
7084
- **question** (字符串, 必需): 需要转换为 SQL 的自然语言问题。
7185
- **knowledge** (字符串, 可选): 用于辅助 SQL 生成的额外上下文或数据库知识。
7286
- **model** (字符串, 可选): 指定的大模型类型,目前可使用通义千问系列的模型。
7387

7488
---
75-
### 数据迁移相关
76-
77-
#### configureDtsJob: 配置 DTS 数据迁移任务,将一个 RDS-MySQL 中的数据迁移到另外一个 RDS-MySQL 中。
78-
- **region_id** (字符串, 必需): 实例所在的区域(例如:杭州 `"cn-hangzhou"`,北京 `"cn-beijing"`)。
79-
- **job_type** (字符串, 必需): DTS 任务类型(例如:同步任务 `"SYNC"`,迁移任务 `"MIGRATION"`)。
80-
- **source_endpoint_region** (字符串, 必需): 源数据库所在的区域(例如:杭州 `"cn-hangzhou"`,北京 `"cn-beijing"`)。
81-
- **source_endpoint_instance_type** (字符串, 必需): 源数据库实例类型(例如:`"RDS"`)。
82-
- **source_endpoint_engine_name** (字符串, 必需): 源数据库引擎类型(例如:`"MySQL"`)。
83-
- **source_endpoint_instance_id** (字符串, 必需): 源数据库实例 ID(例如:`"rm-xxx"`)。
84-
- **source_endpoint_user_name** (字符串, 必需): 源数据库连接用户名。
85-
- **source_endpoint_password** (字符串, 必需): 源数据库连接密码。
86-
- **destination_endpoint_region** (字符串, 必需): 目标数据库所在的区域(例如:杭州 `"cn-hangzhou"`,北京 `"cn-beijing"`)。
87-
- **destination_endpoint_instance_type** (字符串, 必需): 目标数据库实例类型(例如:`"RDS"`)。
88-
- **destination_endpoint_engine_name** (字符串, 必需): 目标数据库引擎类型(例如:`"MySQL"`)。
89-
- **destination_endpoint_instance_id** (字符串, 必需): 目标数据库实例 ID(例如:`"rm-xxx"`)。
90-
- **destination_endpoint_user_name** (字符串, 必需): 目标数据库连接用户名。
91-
- **destination_endpoint_password** (字符串, 必需): 目标数据库连接密码。
92-
- **db_list** (字符串, 必需): 迁移对象,JSON 字符串格式:
93-
示例1:迁移 `dtstest` 数据库,`db_list``{"dtstest":{"name":"dtstest","all":true}}`
94-
示例2:迁移 `dtstest` 数据库下的 `task01` 表,`db_list``{"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true}}}}`
95-
示例3:迁移 `dtstest` 数据库下的 `task01``task02` 表,`db_list``{"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true},"task02":{"name":"task02","all":true}}}}`
96-
97-
#### startDtsJob: 启动 DTS 迁移任务。
98-
- **region_id** (字符串, 必需): 实例所在的区域(例如:杭州 `"cn-hangzhou"`,北京 `"cn-beijing"`)。
99-
- **dts_job_id** (字符串, 必需): DTS 任务 ID。
100-
101-
#### getDtsJob: 获取 DTS 迁移任务详情信息。
102-
- **region_id** (字符串, 必需): 实例所在的区域(例如:杭州 `"cn-hangzhou"`,北京 `"cn-beijing"`)。
103-
- **dts_job_id** (字符串, 必需): DTS 任务 ID。
10489

105-
---
90+
### SQL助手 相关
91+
92+
#### fixSql:SQL修复。
93+
94+
- **database_id** (整数, 必需): DMS 数据库 ID,可通过 getDatabase 工具获取。
95+
- **sql** (字符串, 必需): 需要修复的SQL。
96+
- **error** (字符串, 必需): SQL的报错信息。
97+
- **question** (字符串, 可选): 辅助描述信息。
98+
- **model** (字符串, 可选): 指定的大模型类型,目前可使用通义千问系列的模型。
99+
100+
101+
#### answerSqlSyntax:SQL语法回答。
102+
103+
- **database_id** (整数, 必需): DMS 数据库 ID,可通过 getDatabase 工具获取。
104+
- **question** (字符串, 必需): 问题。
105+
- **model** (字符串, 可选): 指定的大模型类型,目前可使用通义千问系列的模型。
106+
107+
#### optimizeSql:SQL优化。
108+
109+
- **database_id** (整数, 必需): DMS 数据库 ID,可通过 getDatabase 工具获取。
110+
- **sql** (字符串, 必需): 待优化的SQL。
111+
- **question** (字符串, 可选): 辅助描述信息。
112+
- **model** (字符串, 可选): 指定的大模型类型,目前可使用通义千问系列的模型。

doc/Tool-List-en.md

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,19 @@
5555
- **database_id** (string, required): DMS database ID (obtained via getDatabase).
5656
- **script** (string, required): SQL script content to execute.
5757

58+
#### createDataChangeOrder: Create a data change ticket in DMS.
59+
60+
- **database_id** (string, required): DMS database ID (obtained via getDatabase).
61+
- **script** (string, required): SQL script content to execute.
62+
63+
#### getOrderInfo: Retrieve DMS ticket details.
64+
65+
- **order_id** (string, required):The ticket ID in DMS.
66+
67+
#### submitOrderApproval: Submit a DMS ticket for approval.
68+
69+
- **order_id** (string, required):The ticket ID in DMS.
70+
5871
---
5972

6073
### NL2SQL Related
@@ -64,38 +77,36 @@
6477
- **question** (string, required): Natural language question to convert into SQL.
6578
- **database_id** (integer, required): DMS database ID (obtained via getDatabase).
6679
- **knowledge** (string, optional): Additional context or database knowledge to assist SQL generation.
80+
- **model** (string, optional): The specified large language model type; currently supports Qwen series models.
81+
6782

68-
#### askDatabase: Retrieve database execution results directly using natural language questions
83+
#### askDatabase: Retrieve database execution results directly using natural language questions.
6984
- **question** (string, required): The natural language question to be converted into SQL.
7085
- **knowledge** (string, optional): Additional context or database knowledge used to assist in SQL generation.
86+
- **model** (string, optional): The specified large language model type; currently supports Qwen series models.
7187

7288
---
73-
### Data Migration Related
74-
75-
#### configureDtsJob: Configure a DTS data migration task that migrates data from one RDS-MySQL instance to another RDS-MySQL instance.
76-
- **region_id** (string, required): The region where the instance is located (e.g., Hangzhou `"cn-hangzhou"`, Beijing `"cn-beijing"`).
77-
- **job_type** (string, required): The type of DTS job (e.g., synchronization job `"SYNC"`, migration job `"MIGRATION"`).
78-
- **source_endpoint_region** (string, required): The region where the source database is located (e.g., Hangzhou `"cn-hangzhou"`, Beijing `"cn-beijing"`).
79-
- **source_endpoint_instance_type** (string, required): The type of source database instance (e.g., `"RDS"`).
80-
- **source_endpoint_engine_name** (string, required): The engine type of the source database (e.g., `"MySQL"`).
81-
- **source_endpoint_instance_id** (string, required): The ID of the source database instance (e.g., `"rm-xxx"`).
82-
- **source_endpoint_user_name** (string, required): The username for connecting to the source database.
83-
- **source_endpoint_password** (string, required): The password for connecting to the source database.
84-
- **destination_endpoint_region** (string, required): The region where the destination database is located (e.g., Hangzhou `"cn-hangzhou"`, Beijing `"cn-beijing"`).
85-
- **destination_endpoint_instance_type** (string, required): The type of destination database instance (e.g., `"RDS"`).
86-
- **destination_endpoint_engine_name** (string, required): The engine type of the destination database (e.g., `"MySQL"`).
87-
- **destination_endpoint_instance_id** (string, required): The ID of the destination database instance (e.g., `"rm-xxx"`).
88-
- **destination_endpoint_user_name** (string, required): The username for connecting to the destination database.
89-
- **destination_endpoint_password** (string, required): The password for connecting to the destination database.
90-
- **db_list** (string, required): The migration object in JSON string format:
91-
Example 1: Migrate the `dtstest` database, and set `db_list` to `{"dtstest":{"name":"dtstest","all":true}}`;
92-
Example 2: Migrate the `task01` table under the `dtstest` database, and set `db_list` to `{"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true}}}}`;
93-
Example 3: Migrate the `task01` and `task02` tables under the `dtstest` database, and set `db_list` to `{"dtstest":{"name":"dtstest","all":false,"Table":{"task01":{"name":"task01","all":true},"task02":{"name":"task02","all":true}}}}`.
94-
95-
#### startDtsJob: Start a DTS migration task.
96-
- **region_id** (string, required): The region where the instance is located (e.g., Hangzhou `"cn-hangzhou"`, Beijing `"cn-beijing"`).
97-
- **dts_job_id** (string, required): The DTS job ID.
98-
99-
#### getDtsJob: Get detailed information about a DTS migration task.
100-
- **region_id** (string, required): The region where the instance is located (e.g., Hangzhou `"cn-hangzhou"`, Beijing `"cn-beijing"`).
101-
- **dts_job_id** (string, required): The DTS job ID.
89+
90+
### SQL Assistant Related
91+
92+
#### fixSql:SQL Repair.
93+
94+
- **database_id** (integer, required): DMS database ID (obtained via getDatabase).
95+
- **sql** (string, required): The SQL statement to be repaired.
96+
- **error** (string, required): The error message associated with the SQL.
97+
- **question** (string, optional): Supplementary descriptive information.
98+
- **model** (string, optional): The specified large language model type; currently supports Qwen series models.
99+
100+
101+
#### answerSqlSyntax:SQL Syntax Response.
102+
103+
- **database_id** (integer, required): DMS database ID (obtained via getDatabase).
104+
- **question** (string, required): The question.
105+
- **model** (string, optional): The specified large language model type; currently supports Qwen series models.
106+
107+
#### optimizeSql:SQL Optimization.
108+
109+
- **database_id** (integer, required): DMS database ID, which can be obtained via the getDatabase tool.
110+
- **sql** (string, required): The SQL statement to be optimized.
111+
- **question** question (string, optional): Supplementary descriptive information.
112+
- **model** (string, optional): The specified large language model type; currently supports Qwen series models.

0 commit comments

Comments
 (0)