feat: add smart turn v3

This commit is contained in:
Abhishek Kumar 2025-12-10 09:07:03 +07:00
parent 94b7d7e2f2
commit 4640f69f9b
4 changed files with 4 additions and 37 deletions

View file

@ -67,14 +67,6 @@ def create_user_idle_callback(engine: "PipecatEngine"):
) -> bool:
logger.debug(f"Handling user_idle, attempt: {retry_count}")
# Check if we're on a StartNode - if yes, directly disconnect
if engine._current_node and engine._current_node.is_start:
logger.debug("User idle on StartNode - disconnecting immediately")
await engine.send_end_task_frame(
EndTaskReason.USER_IDLE_MAX_DURATION_EXCEEDED.value
)
return False
if retry_count == 1:
# Simulate an LLM generation, so that we can have the LLM context
# updated with the new message