From b92768abd37bad323a14191af3a8750de40cd4a9 Mon Sep 17 00:00:00 2001 From: Ajay Raj Date: Thu, 13 Jun 2024 16:04:43 -0700 Subject: [PATCH] make mark terminated sync instead of async --- vocode/streaming/streaming_conversation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vocode/streaming/streaming_conversation.py b/vocode/streaming/streaming_conversation.py index 8e47980166..aadf6bfa6c 100644 --- a/vocode/streaming/streaming_conversation.py +++ b/vocode/streaming/streaming_conversation.py @@ -421,7 +421,7 @@ async def process(self, item: InterruptibleAgentResponseEvent[AgentResponse]): if self.last_agent_response_tracker is not None: await self.last_agent_response_tracker.wait() item.agent_response_tracker.set() - await self.conversation.mark_terminated(bot_disconnect=True) + self.conversation.mark_terminated(bot_disconnect=True) return agent_response_message = typing.cast(AgentResponseMessage, agent_response) @@ -747,7 +747,7 @@ async def send_initial_message( async def action_on_idle(self): logger.debug("Conversation idle for too long, terminating") - await self.mark_terminated(bot_disconnect=True) + self.mark_terminated(bot_disconnect=True) return async def check_for_idle(self): @@ -961,11 +961,11 @@ async def get_chunks( synthesis_result.synthesis_total_span.finish() return message_sent, cut_off - async def mark_terminated(self, bot_disconnect: bool = False): + def mark_terminated(self, bot_disconnect: bool = False): self.active = False async def terminate(self): - await self.mark_terminated() + self.mark_terminated() self.broadcast_interrupt() self.events_manager.publish_event( TranscriptCompleteEvent(