const model = new google.beta.realtime._RealtimeMo...
# ask-ai
r
const model = new google.beta.realtime._RealtimeModel_({ model: 'gemini-2.0-flash-exp', voice: 'Puck', instructions: 'You are a helpful assistant.', apiKey: process.env.GOOGLE_API_KEY, }) const agent = new multimodal._MultimodalAgent_({ model, fncCtx, chatCtx: initialContext }); why is it showing error in MultiModalAgent in model
t
Thanks for reaching out, Hrithik. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like the error you're encountering when passing a
RealtimeModel
instance to the
MultimodalAgent
isn't because of the argument type itself—that part seems to be correct! The issue might be coming from a few other areas: • Authentication Failure: Please make sure your
apiKey
is valid and properly set in the
RealtimeModel
constructor. • Invalid Parameters: It’s a good idea to double-check that the
model
and
voice
values you’re using are supported. • Network Issues: Sometimes connectivity hiccups with the API can cause problems, so a quick check there might help. • Type Confusion: Confirm that your
RealtimeModel
instance is correctly constructed and fully compatible with the
MultimodalAgent
. Taking a closer look at these points should help uncover what’s causing the error. If you’d like, I’m here to help you troubleshoot further—just let me know! Sources: agent.py | src/agent.ts | Working with the MultimodalAgent class | LiveKit Docs | sip-refer/agent.py | agent/main.py