ERROR outbound-caller - Unhandled error while gett...
# ask-ai
h
ERROR outbound-caller - Unhandled error while getting session: module 'livekit.plugins.google' has no attribute 'realtime' after updating to
Copy code
session = AgentSession(
    llm=google.realtime.RealtimeModel(
from:
Copy code
session = AgentSession(
    llm=google.beta.realtime.RealtimeModel(
t
Thanks for reaching out, manish. 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 is happening because your current installation of the
livekit-plugins-google
package doesn’t include the stable
realtime
module yet. No worries—here’s how we can fix this together: 1. First, try updating the package to the latest version by running this command:
Copy code
pip install --upgrade livekit-plugins-google
1. Next, let’s check that the installation worked by importing the module like this:
Copy code
from livekit.plugins.google.realtime import RealtimeModel
print("Successfully imported RealtimeModel")
1. Then, make sure you’re using the correct import syntax in your code:
Copy code
from livekit.plugins import google
llm = google.realtime.RealtimeModel(
    voice="Puck",
    temperature=0.8,
    modalities=["AUDIO"]
)
Also, please double-check that your environment is set up with the right configuration for the
RealtimeModel
, like the necessary Google API environment variables. If updating right now isn’t an option, you can temporarily use the beta version with this:
Copy code
from livekit.plugins.google import beta
llm = beta.realtime.RealtimeModel()
If you run into any more questions or need a hand with anything else, just let me know—I’m here to help! Sources: examples/voice_agents/realtime_with_tts.py | Real-time AI Models & Streaming | livekit/livekit_composite | DeepWiki