diff --git a/vocode/streaming/streaming_conversation.py b/vocode/streaming/streaming_conversation.py index da3083f1f..3b968281e 100644 --- a/vocode/streaming/streaming_conversation.py +++ b/vocode/streaming/streaming_conversation.py @@ -79,6 +79,20 @@ def create_interruptible_event( self.conversation.interruptible_events.put_nowait(interruptible_event) return interruptible_event + def create_interruptible_agent_response_event( + self, + payload: Any, + is_interruptible: bool = True, + agent_response_tracker: Optional[asyncio.Event] = None, + ) -> InterruptibleAgentResponseEvent: + interruptible_event = super().create_interruptible_agent_response_event( + payload, + is_interruptible=is_interruptible, + agent_response_tracker=agent_response_tracker, + ) + self.conversation.interruptible_events.put_nowait(interruptible_event) + return interruptible_event + class TranscriptionsWorker(AsyncQueueWorker): """Processes all transcriptions: sends an interrupt if needed and sends final transcriptions to the output queue"""