fix: harden online validation flows
This commit is contained in:
@@ -165,6 +165,20 @@ def build_fission_prompt(
|
||||
kw_parts = [x for x in ([name] + sp_words + ([audience] if audience != "未提供" else [])) if x and x != "未提供"]
|
||||
kw_line = "、".join(kw_parts) if kw_parts else ""
|
||||
|
||||
benchmark_refs = prod.get("benchmark_refs") or []
|
||||
benchmark_lines: list[str] = []
|
||||
for idx, ref in enumerate(benchmark_refs[:3], start=1):
|
||||
if not isinstance(ref, dict):
|
||||
continue
|
||||
compact = []
|
||||
for key in ("title_style", "cover_hook", "pain_point", "scene", "selling_angle", "visual_structure"):
|
||||
val = ref.get(key)
|
||||
if val:
|
||||
compact.append(f"{key}:{val}")
|
||||
if compact:
|
||||
benchmark_lines.append(f"标杆配方{idx}:" + ";".join(compact))
|
||||
benchmark_block = "\n".join(benchmark_lines) if benchmark_lines else "未选择或未分析完成"
|
||||
|
||||
# D3修复:按套序循环分配 A/B/C 叙事主线
|
||||
narrative_keys = list(TEXT_NARRATIVE_BY_STRATEGY.keys()) # ["A","B","C"]
|
||||
narrative_lines = []
|
||||
@@ -182,6 +196,7 @@ def build_fission_prompt(
|
||||
产品卖点:{'、'.join(points) or '未提供'}
|
||||
目标人群:{audience}
|
||||
关键词:{kw_line}
|
||||
标杆8维配方参考:{benchmark_block}
|
||||
裂变维度:{'、'.join(dims)}
|
||||
爆款参考度:{strategy['level_label']}。{strategy['prompt_rule']}
|
||||
生成数量:{note_count}套
|
||||
|
||||
Reference in New Issue
Block a user