Hi we are trying to implement during call so that ...
# ask-ai
c
Hi we are trying to implement during call so that the discussion does not reach much more than 5 minuts we tried telling it to the llm but does not work well
t
Thanks for reaching out, Tim. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! Could you help me understand a bit more about what you mean by "implement during call"? Are you hoping to set a time limit for your calls, or are you looking for a way to manage conversations within a 5-minute window? Also, if you could share a little more about how you're using the LLM and the specific challenge you're facing, that would be super helpful. I'm here to assist you every step of the way!
c
we want the llm to stop or gently stop the call after 5 minuts of conversation
t
It’s great that you’re looking to gently wrap up a call after 5 minutes using an LLM. Here’s a friendly approach you can try that combines timing with understanding the flow of conversation: • Set a hard time limit: You can use a timer to automatically end the call after 5 minutes. For instance, setting a
max_duration
parameter can help make sure the call ends smoothly and on time. • Use LLM for semantic detection: Train your LLM to recognize natural stopping points in the conversation and trigger a function to end the call when it feels right. This is possible with function calling features. • Combine both approaches: Around 4.5 minutes in, prompt the LLM to gently suggest wrapping things up. If the chat continues, the timer will step in at 5 minutes to close the call. If you’d like, I’d be happy to share some detailed examples in Python or TypeScript to help you get this set up. Just let me know! Sources: How to detect and handle silence during calls | Operational Guidance & Best Practices | livekit/livekit_composite | DeepWik... | examples/src/basic_eou.ts | livekit-agents/livekit/agents/voice/agent_activity.py | Improving voice AI's turn detection with transformers