strong-lamp-18251
02/28/2025, 4:56 PMgray-monkey-83525
02/28/2025, 4:56 PMMultimodalAgent
does not interrupt the previous response, you can manage the timing of tool calls by queuing them to execute only after the current speech has finished. This can be achieved by listening to the agent_stopped_speaking
event and then triggering the tool call.
Here's a basic approach:
1. Listen for the agent_stopped_speaking
Event: Use the event to detect when the agent has finished speaking.
2. Queue the Tool Call: Once the agent has stopped speaking, execute the tool call.
@agent.on("agent_stopped_speaking")
async def on_agent_stopped_speaking():
# Trigger the tool call here
await agent.execute_tool_call()
Would you like more detailed guidance on implementing this?
Sources:
- https://docs.livekit.io/python/livekit/plugins/openai/beta/assistant_llm.html#livekit.plugins.openai.beta.assistant_llm.AssistantLLMStream
- https://livekit-users.slack.com/archives/C07FY8WHGPM/p1729822736.610669 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.strong-lamp-18251
02/28/2025, 4:59 PMstrong-lamp-18251
02/28/2025, 5:05 PM