refactor(chat): AI-native prompts, remove interview heuristics
- Drop interview_reply_length and utterance_substance; always run stage LLM and memory retrieval when enabled; trim Settings fields and .env.example. - Replace guided/opening prompts with compact fact blocks plus unified behavior guidance; slim background_voice and persona to tone hints. - InterviewAgent uses fixed chat_interview max_tokens/chars/segments. Also includes stacked work: profile followup/extract path, evaluation rubric and judge schema updates, transcript SPLIT handling in execution service, user export markdown split tests, and golden case fixture.
This commit is contained in:
@@ -5,6 +5,11 @@ from __future__ import annotations
|
||||
import re
|
||||
|
||||
|
||||
def _normalize_export_ai_block(body: str) -> str:
|
||||
"""多段助手回复中的 [SPLIT] 在 Markdown 导出中改为换行,便于阅读。"""
|
||||
return (body or "").replace("[SPLIT]", "\n").strip()
|
||||
|
||||
|
||||
def extract_user_utterances_from_export_md(text: str) -> list[str]:
|
||||
"""匹配 ``**用户:**`` 块之间的正文。"""
|
||||
out: list[str] = []
|
||||
@@ -41,6 +46,6 @@ def extract_dialogue_turns_from_export_md(text: str) -> list[tuple[str, str]]:
|
||||
u = (user_m.group(1) or "").strip()
|
||||
if not u or u == "(空)":
|
||||
continue
|
||||
a = ((ai_m.group(1) if ai_m else "") or "").strip()
|
||||
out.append((u, a))
|
||||
raw_ai = ((ai_m.group(1) if ai_m else "") or "").strip()
|
||||
out.append((u, _normalize_export_ai_block(raw_ai)))
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user