feat(chat): host-style memoir prompts and strip parenthetical stage directions

- Add strip_parenthetical_asides_for_chat in reply pipeline before [SPLIT]
- Expand output_rules bans (performance parens) and voice as warm host
- Refocus opening/guided prompts on pulling conversation toward memoir oral history
- Align interview opening fallbacks with memoir-first tone
- Add unit tests for parenthetical stripping
This commit is contained in:
Kevin
2026-04-10 13:55:08 +08:00
parent deeacfb7ee
commit df6eafeae2
5 changed files with 69 additions and 24 deletions

View File

@@ -257,7 +257,7 @@ class InterviewAgent:
) -> List[str]:
"""生成空对话开场白,不持久化(由 Orchestrator 负责)"""
if not self.llm:
return ["你好呀~ 又见面了今天有没有哪段回忆或近况想聊聊?"]
return ["你好呀~ 又见面了今天想从人生里哪一小段回忆开始聊聊?"]
try:
empty_slots = memoir_state.prompt_empty_slots_for_current_stage()
empty_slots_readable = [SLOT_NAME_MAP.get(s, s) for s in empty_slots]
@@ -343,8 +343,8 @@ class InterviewAgent:
segments = out if out else [response_text.strip()[:max_chars]]
return nonempty_segments_or_fallback(
segments,
fallback="你好呀~ 又见面了,最近有没有什么事想跟我说说",
fallback="你好呀~ 又见面了。今天想从人生里哪一小段回忆开始聊聊",
)
except Exception as e:
logger.error("生成开场白失败: {}", e, exc_info=True)
return ["你好呀~ 又见面了,最近有没有什么事想跟我说说"]
return ["你好呀~ 又见面了。今天想从人生里哪一小段回忆开始聊聊"]