test/ 调整prompt,提高共情能力
This commit is contained in:
@@ -43,6 +43,36 @@ def test_guided_prompt_mentions_empathy_and_self_judgment():
|
||||
)
|
||||
assert "接住对方" in p
|
||||
assert "你自己判断" in p or "该追问" in p
|
||||
assert "共情与轻量自我表露" in p
|
||||
assert "意义向深挖" in p
|
||||
|
||||
|
||||
def test_guided_prompt_era_popculture_open_questions_when_birth_year():
|
||||
p = get_guided_conversation_prompt(
|
||||
current_stage="childhood",
|
||||
empty_slots=["place"],
|
||||
filled_slots={},
|
||||
detected_user_stage="childhood",
|
||||
user_profile_context="",
|
||||
persona="default",
|
||||
profile_birth_year=1985,
|
||||
profile_era_place="潍坊",
|
||||
)
|
||||
assert "时代与氛围参考" in p
|
||||
assert "流行文化" in p
|
||||
assert "开放式" in p
|
||||
|
||||
|
||||
def test_opening_prompt_includes_era_task_when_birth_year_configured():
|
||||
p = get_opening_prompt(
|
||||
current_stage="childhood",
|
||||
empty_slots_readable=["成长的地方"],
|
||||
user_profile_context="出生年份:1985年",
|
||||
persona="default",
|
||||
profile_birth_year=1985,
|
||||
profile_era_place="潍坊",
|
||||
)
|
||||
assert "年代氛围" in p
|
||||
|
||||
|
||||
def test_guided_prompt_persona_tone_warm_listener():
|
||||
@@ -102,7 +132,7 @@ def test_guided_prompt_military_tone_in_system():
|
||||
assert "简洁" in p or "利落" in p or "得体" in p
|
||||
|
||||
|
||||
def test_opening_prompt_military_has_examples_note() -> None:
|
||||
def test_opening_prompt_military_style_rules_not_dialogue_samples() -> None:
|
||||
p = get_opening_prompt(
|
||||
current_stage="childhood",
|
||||
empty_slots_readable=["成长的地方"],
|
||||
@@ -110,7 +140,8 @@ def test_opening_prompt_military_has_examples_note() -> None:
|
||||
persona="default",
|
||||
background_voice="military",
|
||||
)
|
||||
assert "军队语境" in p
|
||||
assert "军队相关" in p
|
||||
assert "示例" not in p
|
||||
|
||||
|
||||
def test_format_history_string_includes_system_for_debug_logs() -> None:
|
||||
|
||||
Reference in New Issue
Block a user