white-telephone-81843
12/19/2025, 8:40 AMtall-airline-16756
12/19/2025, 8:40 AMtall-airline-16756
12/19/2025, 8:40 AMinstructions. Example (Python):
from livekit.agents import AgentSession
from livekit.plugins import xai
session = AgentSession(
llm=xai.realtime.RealtimeModel(
voice="Ara",
instructions="You are a helpful assistant. Respond in Norwegian (Bokmål). Use natural pronunciation, appropriate intonation, and culturally-aware speech rhythms. Keep a friendly, conversational tone."
),
)
Notes:
• Specify the language and any preferred variant (e.g., “Bokmål”) in plain text inside instructions.
• Specific Norwegian dialect codes (like nb-NO) aren’t selectable here; use descriptive instructions instead.
• If users will speak Norwegian, ensure your STT component supports Norwegian for accurate transcription.
Would you like a short JS/TS example or a version that requests a particular accent (e.g., “Oslo accent”) in the instructions?
Sources: xAI Grok Voice Agent API plugin | LiveKit docstall-airline-16756
12/19/2025, 8:47 AMRealtimeModel.__init__() rejecting the instructions argument and your goal to set Norwegian.
What I’m seeing: your runtime error means the installed xAI plugin version doesn’t accept instructions on xai.realtime.RealtimeModel, even though the API supports language-setting via system instructions.
To move forward I can help two ways — please pick one or provide the requested info:
1) Quick check & fix (recommended)
• Run and share the output of:
pip show livekit-agents livekit-plugins-xai
I’ll confirm if your versions lack the instructions parameter and give the exact upgrade command to install the release that includes it.
2) Immediate workaround (no SDK change)
• Remove instructions from the RealtimeModel constructor and inject your language guidance at session start instead. Example pattern:
session = AgentSession(llm=xai.realtime.RealtimeModel(voice="Ara"))
await session.say("Fra nå av svarer jeg på norsk (Bokmål).")
• Or include a first-system message in your agent flow that instructs the model to respond in Norwegian and with the desired intonation.
If you want, share the pip show output and the snippet where you construct RealtimeModel and I’ll give the exact upgrade or code change to apply.
Sources: OpenAI Realtime API plugin guide | LiveKit docs | xAI and LiveKit | LiveKit docs | Gemini Live API plugin | LiveKit docs