refactor: 步骤4智能体任务改为传递内容库ID

- 模板改为传递内容库数据ID列表而非内容摘要
- 智能体任务改为分析ID对应数据与产品的相关性和参数提取价值
- 智能体输出改为relevant_ids列表+分析说明
- 步骤3保存内容库时记录article_id
- 步骤4根据智能体返回的ID从内容库获取实际内容
- 更新_fill_fields适配新的extracted_data格式
This commit is contained in:
2026-07-15 13:00:03 +08:00
parent 96c479916b
commit 5fdcf7a5b6
3 changed files with 152 additions and 84 deletions
+2 -2
View File
@@ -248,8 +248,8 @@ def preview_agent_template():
filled = template.replace('{{product_name}}', product_name)
filled = filled.replace('{{category}}', category)
filled = filled.replace('{{subcategory}}', subcategory or '')
filled = filled.replace('{{library_results}}', '[内容库搜索结果将在此处列出,包含文章标题、URL、摘要等]')
filled = filled.replace('{{internet_results}}', '[互联网抓取内容将在此处列出,包含URL、标题、正文片段等]')
filled = filled.replace('{{library_results}}', 'ID 101: 示例文章标题A\nID 102: 示例文章标题B\nID 103: 示例文章标题C')
filled = filled.replace('{{internet_results}}', 'ID 104: 示例互联网抓取标题X\nID 105: 示例互联网抓取标题Y')
return jsonify({
'success': True,