Spaces:
Sleeping
Sleeping
File size: 296 Bytes
759bf41 | 1 2 3 4 5 6 7 8 9 10 11 | from .config import CALLER_TURNS
def last_turns(transcript: str, count: int = CALLER_TURNS) -> list[str]:
lines = [line.strip() for line in transcript.splitlines() if line.strip()]
return lines[-count:]
def window(transcript: str) -> str:
return "\n".join(last_turns(transcript))
|