busy-fish-13948
08/14/2025, 12:03 PMinstructions I have this prompt `".... if the user wants to end the call, say that they can continue on the app later, wish them a good they and use 'end_call' to end the call"
@function_tool()
async def end_call(self) -> None:
"""Use this tool to end the call."""
current_speech = self.session.current_speech
if current_speech:
await current_speech
self._closing_task = asyncio.create_task(self.session.aclose())
get_job_context().shutdown()
return None
Here is the function_tool but sometimes the agent never says anything and ends abruptly, sometimes it ends mid-sentence, sometimes it works as intended, does anyone have any idea? I'm using gemini-live realtime models.