fix: harden online validation flows

This commit is contained in:
yangqianqian
2026-07-01 10:56:08 +08:00
parent da137f099f
commit 033ef89536
7 changed files with 142 additions and 15 deletions

View File

@@ -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}