Can we change the model information for llm, stt o...
# ask-ai
c
Can we change the model information for llm, stt or tts mid conversation through tool calls?
t
Thanks for reaching out, Subham. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand you'd like to change the LLM, STT, or TTS model configurations during an active conversation. While it's not possible to directly update these settings on the current agent instance mid-conversation, there’s a great way to achieve what you need by transferring control to a new agent instance with the models you want. Here are two friendly methods you can use: • Using `llm.handoff()`: This lets you return a new agent instance from a tool call, smoothly handing over the conversation to that new agent. • Using `session.update_agent()`: This approach replaces the current agent in your session with a new one, and it will automatically trigger the
on_exit()
method of the old agent and the
on_enter()
method of the new one. If you'd like, I’m here to help with more details or examples on how to set these up. Just let me know! Sources: agents/src/voice/agent_activity.ts | multi-agent/long_or_short_agent.py | livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/real...
c
No, I just want to update tts options let's say, is it necessary to do a agent handoff?
t
Great news! You can actually update TTS options right in the middle of a conversation without needing to perform an agent handoff. This is made possible through the
update_options
method available on TTS plugin instances, which lets you easily adjust settings like voice, language, speed, pitch, and volume while the session is still active. These changes will take effect on the very next synthesized utterance, so your conversation keeps flowing smoothly without any interruptions. If you'd like, I’m here to help you with step-by-step guidance on how to use this method for your specific TTS plugin—just let me know! Sources: Hume TTS integration guide | LiveKit Docs | plugins/cartesia/src/tts.ts | livekit-plugins/livekit-plugins-upliftai/livekit/plugins/upliftai/tts.py | Hume TTS integration guide | LiveKit Docs