feat(memoir): 路由阶段不要求标题,按正文字数门闸延迟 LLM 标题
- 从 story 路由 prompt/校验中移除 new_story_title,改由叙事管线在正文足够长时生成 - 新增 story_title_min_body_chars;短正文使用章节类别占位标题 - CATEGORY_TO_CHAT_STAGE 对齐访谈 state.slots 的 stage 键 - 删除相对口述长度的叙事回退,仅保留 merge JSON 极端缩水类 fallback - evidence_format:解析 object_json 并优化事实条目标点符号 - 更新 narrative / experience 相关单测
This commit is contained in:
@@ -116,7 +116,8 @@ def validate_story_batch_plan(
|
||||
valid_story_ids: set[str],
|
||||
) -> tuple[bool, str | None]:
|
||||
"""
|
||||
校验:segment 全覆盖、顺序一致、append 目标合法、new_story 有标题。
|
||||
校验:segment 全覆盖、顺序一致、append 目标合法。
|
||||
标题由 NarrativeAgent 延迟生成,路由阶段不再要求 new_story_title。
|
||||
返回 (ok, error_code)。
|
||||
"""
|
||||
if not plan.units:
|
||||
@@ -135,10 +136,6 @@ def validate_story_batch_plan(
|
||||
tid = u.target_story_id
|
||||
if not tid or tid not in valid_story_ids:
|
||||
return False, "invalid_append_target"
|
||||
else:
|
||||
title = (u.new_story_title or "").strip()
|
||||
if not title:
|
||||
return False, "missing_new_title"
|
||||
return True, None
|
||||
|
||||
|
||||
@@ -196,10 +193,6 @@ class StoryRouteAgent:
|
||||
new_story_title=decision.new_story_title,
|
||||
reason="invalid_target",
|
||||
)
|
||||
if decision.decision == "new_story" and not (
|
||||
decision.new_story_title and decision.new_story_title.strip()
|
||||
):
|
||||
decision.new_story_title = None
|
||||
return decision
|
||||
|
||||
def plan_batch(
|
||||
|
||||
Reference in New Issue
Block a user