If I call `update_options` on a vad instance that ...
# ask-ai
g
If I call
update_options
on a vad instance that is stored in JobContext.proc.userdata, will it update the options across all calls running on the agent? Or just with that call?
t
Thanks for reaching out, Ben. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Just a heads-up: when you call
update_options
on a VAD instance stored in
JobContext.proc.userdata
, it updates the options only for that specific call. It won’t change anything for other calls running on the agent. That’s because each call or session gets its own
VADStream
instance, and these streams are handled locally within the VAD instance for that call. So, any updates you make to the options only affect the streams tied to the current VAD instance. Sources: examples/src/basic_agent.ts | examples/voice_agents/multi_agent.py