Files
param-auto-manager/config/agent_fill_fields_template.txt
T
hz4th_coder eea7269eda feat: 步骤5填充字段改用智能体执行
- 新增步骤5任务模板(config/agent_fill_fields_template.txt)
- 步骤5调用智能体hz4th_editor执行:
  1. 获取API文档了解对应类别字段定义
  2. 从内容库获取相关内容数据
  3. 整理产品参数
  4. 通过API提交到ParamHub审核系统
- /process页面新增步骤5模板编辑面板
- 步骤6改为确认提交结果(备用本地提交)
- 新增API: GET/POST /api/process/fill-fields-template
2026-07-15 16:31:00 +08:00

72 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 任务背景
### 产品基本信息
- **产品名称:** {{product_name}}
- **产品类别:** {{category}}
- **子类别:** {{subcategory}}
### 相关内容数据ID
上一步已筛选出以下与产品直接相关且对参数提取有用的内容库数据ID:
{{relevant_content_ids}}
## 任务要求
请完成以下工作:
### 1. 获取对应类别的字段配置
首先,请访问 ParamHub API 文档获取对应类别的字段定义:
- API文档地址:http://192.168.2.8:12007/hz4th_coder/param-hub-python/src/branch/master/API.md
- 根据产品类别({{category}})确定应该使用哪个API
- AI模型 → `/api/models`
- GPU → `/api/gpus`
- CPU → `/api/cpus`
- 其他动态分类 → `/api/items/{category_id}`
### 2. 从内容库获取数据内容
根据上述数据ID,从内容库中获取每条数据的完整内容。
### 3. 整理产品参数
根据获取到的内容,提取并整理产品的各项参数,严格按照API文档中定义的字段格式填充。
### 4. 提交到审核系统
使用以下命令提交到ParamHub审核系统:
```bash
# 先登录获取cookie
curl -c /tmp/paramhub_cookie.txt -X POST "http://localhost:16041/login" \
-H "Content-Type: application/json" \
-d '{"password": "admin123"}'
# 然后提交产品数据(根据类别选择对应的API)
curl -b /tmp/paramhub_cookie.txt -X POST "http://localhost:16041/api/{对应类别API}" \
-H "Content-Type: application/json" \
-d '{
"name": "{{product_name}}",
"visible": true,
"is_pinned": false,
// ... 其他字段根据API文档填充
}'
```
### 5. 输出要求
请以JSON格式输出执行结果:
```json
{
"success": true,
"review_id": "审核ID(如果提交成功)",
"submitted_data": {
"name": "产品名称",
"field1": "值1",
"field2": "值2"
},
"data_sources": [数据ID列表],
"message": "执行说明"
}
```
**注意:**
- 严格按照API文档的字段定义填充数据
- 不要编造或推测任何参数,只使用内容库中实际存在的信息
- 如果某些字段无法从内容中提取,可以留空或填写默认值
- 提交成功后记录返回的review_id