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

这是进入 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
+4 -3
View File
@@ -234,7 +234,8 @@ class EngineProcessor(FrameProcessor):
self._engine = ConversationEngine(
self.cfg, self._llm, self._memory, ManualIdentityProvider(),
create_tts(self.cfg.voice), stt=None)
self._session = await self._engine.start_session(user_id="u_ylhan")
self._session = await self._engine.start_session(
user_id=self.cfg.default_user_id)
if require_stt and self._engine.stt is None:
self._engine.stt = StreamingSTT(self.cfg.voice)
return self._engine
@@ -383,7 +384,7 @@ class EngineProcessor(FrameProcessor):
if ev.kind == EventKind.TRANSCRIPT and ev.text:
await self.push_frame(TranscriptionFrame(
text=ev.text,
user_id="u_ylhan",
user_id=self.cfg.default_user_id,
timestamp=datetime.now(UTC).isoformat(),
finalized=True,
))
@@ -391,7 +392,7 @@ class EngineProcessor(FrameProcessor):
RTVI.UserTranscriptionMessage(
data=RTVI.UserTranscriptionMessageData(
text=ev.text,
user_id="u_ylhan",
user_id=self.cfg.default_user_id,
timestamp=datetime.now(UTC).isoformat(),
final=True,
)