in core/realtime.py [0:0]
def _cut_conversation_history(self):
"""Removes old parts from the conversation history."""
if not self._conversation_history:
return
time_cut_point = time.perf_counter() - self._duration_prompt_sec
while (
self._conversation_history
and self._time_conversation_history_sec[0] < time_cut_point
):
self._conversation_history.popleft()
self._time_conversation_history_sec.popleft()