Collapse caller generation to single path, remove feature flag

This commit is contained in:
2026-04-05 04:05:09 -06:00
parent 3f85ee9140
commit 76feeb22a0
4 changed files with 21 additions and 305 deletions
@@ -1,7 +1,7 @@
from backend.main import get_caller_prompt_slim
from backend.main import get_caller_prompt
def test_slim_prompt_includes_identity_and_situation():
def test_prompt_includes_identity_and_situation():
caller = {
"name": "Danny",
"identity": "A plumber who inherited a taxidermy shop",
@@ -10,7 +10,7 @@ def test_slim_prompt_includes_identity_and_situation():
"secret_want": "Permission to throw it all away",
"specific_details": ["elk head in basement", "note said she forgot"],
}
prompt = get_caller_prompt_slim(caller)
prompt = get_caller_prompt(caller)
assert "Danny" in prompt
assert "taxidermy shop" in prompt
assert "strange calls" in prompt
-39
View File
@@ -1,39 +0,0 @@
import sys
sys.path.insert(0, "/Users/lukemacneil/ai-podcast")
from backend.main import Session, CallRecord, get_caller_prompt
def test_caller_prompt_includes_show_history():
s = Session()
s.call_history.append(CallRecord(
caller_type="real", caller_name="Dave",
summary="Called about his wife leaving after 12 years",
transcript=[],
))
s.start_call("1") # Tony
caller = s.caller
show_history = s.get_show_history()
prompt = get_caller_prompt(caller, "", show_history)
assert "Dave" in prompt
assert "wife leaving" in prompt
assert "EARLIER IN THE SHOW" in prompt
def test_caller_prompt_without_history():
s = Session()
s.start_call("1")
caller = s.caller
prompt = get_caller_prompt(caller, "")
assert "EARLIER IN THE SHOW" not in prompt
assert caller["name"] in prompt
def test_caller_prompt_backward_compatible():
"""Verify get_caller_prompt works with just 2 args (no show_history)"""
s = Session()
s.start_call("1")
caller = s.caller
prompt = get_caller_prompt(caller, "Host: hello")
assert "hello" in prompt