Skip to content

Commit 34175c7

Browse files
committed
feat: refine function definition requirements in GenerateCodeDialog for improved clarity
1 parent a2c7fda commit 34175c7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

ui/src/views/tool/component/GenerateCodeDialog.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ const promptTemplates = {
168168
169169
- 仅输出纯 Python 代码块,无任何多余的文字解释、注释以外的说明;
170170
- 代码兼容 Python 3.8 及以上版本,符合 PEP8 编码规范,关键逻辑添加简洁中文注释;
171-
- 适配 MaxKB 工具 / 数据源的调用逻辑:支持接收平台配置的「启动参数」「输入参数」,包含完整的异常捕获(网络、参数、权限、执行异常等);
172-
- 代码结构模块化,函数命名清晰,返回值为 MaxKB 平台可解析的标准化结果;
173171
- 仅使用 MaxKB 内置依赖(如 requests、pymysql、pandas、json 等),不引入未声明的第三方库。
174172
175173
{userInput}
@@ -179,7 +177,7 @@ const promptTemplates = {
179177
- 核心功能:用户输入的主题 / 功能需求
180178
- 启动参数:平台配置的启动参数,如 API 密钥、数据库地址、账号密码等, 已声明参数:{initFieldList}
181179
- 输入参数:平台配置的输入参数,已声明参数:{inputFieldList}
182-
- 函数定义:列举所有启动参数和输入参数并声明返回类型
180+
- 函数定义:依次列举所有启动参数和输入参数并声明返回类型
183181
- 输出要求:代码需接收输入参数,启动参数完成业务逻辑,仅输出函数定义
184182
`,
185183
}

0 commit comments

Comments
 (0)