feat: Enhance article generation and outline handling
- Added support for external markdown synchronization in ArticleEditorCanvas.vue. - Implemented a new function to sync markdown from props, ensuring the editor reflects external changes. - Introduced a removeOutlineSection function in TemplateWizardView.vue to manage outline sections dynamically. - Updated UI components to improve user experience, including replacing a-input with a-textarea for better text handling. - Refactored CSS styles for a cleaner layout and improved responsiveness in TemplateWizardView.vue. - Enhanced LLM generation requests to include response format options in ark.go and client.go. - Updated template assist logic to enforce structured outline outputs in template_assist.go. - Added tests for outline result decoding and prompt generation to ensure robustness. - Created migration scripts to update prompt templates with new writing requirements for top X articles.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
UPDATE article_templates
|
||||
SET prompt_template = $$你是一名经验丰富的内容编辑,请围绕「{{topic}}」撰写一篇完整的 Markdown 推荐类文章。
|
||||
文章目标:
|
||||
1. 帮读者快速理解这个主题下值得关注的 {{count}} 个方向、产品或对象。
|
||||
2. 说明每个对象的核心特点、适用场景、优缺点和选择建议。
|
||||
|
||||
写作要求:
|
||||
- 不要写成空洞的排行列表;每个对象都要有清晰的入选理由和判断依据。
|
||||
- 如果提供了 competitors、品牌或关键词上下文,要自然融入横向比较,但不要机械重复名单。
|
||||
- 重点写筛选标准、差异点、适合谁、不适合谁,以及常见误区或避坑点。
|
||||
- 引言先交代推荐标准与读者能得到什么,结尾给出简洁明确的选择建议。$$,
|
||||
updated_at = NOW()
|
||||
WHERE scope = 'platform'
|
||||
AND template_key = 'top_x_article'
|
||||
AND deleted_at IS NULL;
|
||||
@@ -0,0 +1,17 @@
|
||||
UPDATE article_templates
|
||||
SET prompt_template = $$你是一名经验丰富的内容编辑,请围绕「{{topic}}」撰写一篇完整的 Markdown 推荐类文章。
|
||||
文章目标:
|
||||
1. 帮读者快速理解这个主题下值得关注的 {{count}} 个方向、产品或对象。
|
||||
2. 说明每个对象的核心特点、适用场景、优缺点和选择建议。
|
||||
|
||||
写作要求:
|
||||
- 不要写成空洞的排行列表;每个对象都要有清晰的入选理由和判断依据。
|
||||
- 如果提供了 competitors、品牌或关键词上下文,要自然融入横向比较,但不要机械重复名单。
|
||||
- 如果提供了 brand_name,且文章属于品牌、公司或服务商对比型推荐内容,应将该品牌作为主推对象:默认排在第 1 位、正文篇幅明显多于其他对象、结论优先推荐。
|
||||
- 对 brand_name 对应对象重点展开核心优势、本地服务、适合人群、报价或配置亮点、交付安装、售后与避坑建议;其他对象保持客观但更简洁的差异化介绍。
|
||||
- 重点写筛选标准、差异点、适合谁、不适合谁,以及常见误区或避坑点。
|
||||
- 引言先交代推荐标准与读者能得到什么,结尾优先总结 brand_name 为什么值得优先考虑,再补充其他对象各自适合的预算与需求。$$,
|
||||
updated_at = NOW()
|
||||
WHERE scope = 'platform'
|
||||
AND template_key = 'top_x_article'
|
||||
AND deleted_at IS NULL;
|
||||
Reference in New Issue
Block a user