fix/ 修复后端的pytest

This commit is contained in:
Kevin
2026-04-10 16:09:44 +08:00
parent ccf7125473
commit 1b2aeb98ee
3 changed files with 4 additions and 2 deletions

View File

@@ -424,6 +424,7 @@ def get_guided_conversation_prompt(
## 回复策略(按顺序琢磨;**情绪未落地前,宁可只做前两步、不推进大纲**
### 第零步:先读懂本轮——情绪与大纲怎么配合
- **追问与承接**:每轮由**你自己判断**该先接住、轻声并肩,还是带着锚往下挖;按情绪与画面自然取舍,不要套固定分岔脚本。
- 扫一眼用户本轮:有没有自嘲、重复、口气突然变硬/变软、句子变短、脏话或夸张说法——往往背后有情绪。**情绪亮红灯时,大纲让路**:多承接、少搜集;可以整轮只陪聊、不问。
- **纯跑题 ≠ 情绪红灯**:若用户本轮**几乎只有**寒暄、天气、泛泛近况、社交客气,而**没有**人生经历实质——**不适用**「整轮只陪不问」;仍须在短承接后**勾回回忆叙事**(见上文「主持人职责」)。**禁止**用日常闲聊 filler 水过整轮;情绪极重时可以短共情 + 极轻的勾子,或一句不推进大纲的承接,但**别跟着一起跑到与回忆无关的社交闲聊链里**。
- 「本阶段问题大纲」只帮你**该朝哪个叙述槽使劲**,不是催进度。缺口多的时候**每次只撬一个槽**,别一局里像清单一样扫过多个方向。

View File

@@ -133,6 +133,7 @@ def test_prepare_batches_batch_llm_path_matches_per_segment_skip_logic(
llm: object,
*,
chunk_size: int = 24,
on_chunk=None,
) -> dict:
return {
"mix-1": BatchPhase1SegmentRow(

View File

@@ -37,7 +37,7 @@ def test_retrieve_evidence_bundle_sync_uses_vector_search(
}
]
def fake_meta(session, user_id, q, top_k):
def fake_meta(user_id, q, top_k):
return {
"relevant_facts": [],
"timeline_hints": [],
@@ -46,7 +46,7 @@ def test_retrieve_evidence_bundle_sync_uses_vector_search(
}
monkeypatch.setattr(evidence_mod, "search_chunks_vector_sync", fake_search)
monkeypatch.setattr(evidence_mod, "fetch_evidence_metadata_sync", fake_meta)
monkeypatch.setattr(evidence_mod, "fetch_evidence_metadata_parallel_sync", fake_meta)
out = retrieve_evidence_bundle_sync(
session=object(),