基线:姓名档案修复、疑问句防误写、搜索与传输测试

这是进入 Pipecat Flows 改造前的回滚点。
提交时已核对本地与线上代码 md5 一致(engine.py 7e97bad8、
bot_server.py 1cf543ae),所以这个提交就是当前线上状态。

内容(此前一直在线上运行但未提交的改动):
- 姓名档案:用户自报"我叫林"同步写 confirmed 姓名,重连后恢复
- 疑问句防误写:"谁吗"之类的疑问句不再被覆盖成姓名
- 新增 test_profile_memory.py(姓名档案专项回归)
- 新增 test_profile_live.py(需要真实 LLM 的现场测试)
- 搜索、身份、记忆测试的相应补充

背景:下一步要按 P1-Pipecat Flows Agent化与记忆改造交接.md
渐进引入 Pipecat Flows,交接文档明确要求先保护基线、不得
reset/checkout/覆盖现有改动。此提交即该基线。
This commit is contained in:
ylhan
2026-09-16 12:48:18 +08:00
parent 719fc13e48
commit 20cfaa6ef7
16 changed files with 408 additions and 11 deletions
+2
View File
@@ -66,6 +66,8 @@ class IdentityDecision:
trust_level: str
confirmed: bool # True = 经确认;False = 默认访客
reason: str
# 用户可见称呼,与内部稳定 user_id 分开;自报姓名不能提升信任等级。
display_name: str = ""
#: 未被采纳的候选,保留下来供上层提示"是否要切换成 X"
suggestions: list[IdentityClaim] = field(default_factory=list)