Are azure open ai/aws bedrock llms supported on li...
# ask-ai
t
Are azure open ai/aws bedrock llms supported on livekit self deployed?
t
Thanks for reaching out, harshal. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — good question. Yes — both Azure OpenAI and AWS Bedrock LLMs are supported on self-deployed LiveKit through the LiveKit Agents framework. You can use the Azure OpenAI plugin (requires endpoint, deployment name, and API key or Microsoft Entra token) and the AWS Bedrock plugin (requires AWS credentials in the environment). These plugins work with any LiveKit deployment and do not require LiveKit Cloud. Would you like example code for Python or Node.js and which provider (Azure or AWS) should I show first? Sources: Large language models (LLM) | LiveKit Docs | Azure OpenAI LLM plugin guide | LiveKit docs | Amazon Bedrock LLM plugin guide | LiveKit docs
t
Azure open ai
t
Thanks — I'll show how to use Azure OpenAI with a self‑deployed LiveKit via the LiveKit Agents framework and give concise example code (Python and Node.js). Key points • Use the Azure OpenAI plugin for LiveKit Agents. • Required: Azure endpoint (e.g., https://<your-resource>.openai.azure.com/), the deployment name, and an API key or Microsoft Entra ID token. • This works on self‑hosted LiveKit; LiveKit Cloud is not required. Python example
Copy code
from livekit.agents import AgentSession
from livekit.plugins import openai

session = AgentSession(
    llm=openai.LLM.with_azure(
        azure_deployment="<your-deployment-name>",
        azure_endpoint="https://<your-resource>.<http://openai.azure.com/|openai.azure.com/>",
        api_key="<your-api-key>",
        api_version="2024-10-01-preview",
    )
)

# use `session` to run agent tasks, prompts, etc.
Node.js example
Copy code
import { AgentSession } from "livekit-agents";
import { openai } from "livekit-plugins";

const session = new AgentSession({
  llm: openai.LLM.withAzure({
    azure_deployment: "<your-deployment-name>",
    azure_endpoint: "https://<your-resource>.<http://openai.azure.com/|openai.azure.com/>",
    api_key: "<your-api-key>",
    api_version: "2024-10-01-preview",
  }),
});

// use `session` to run agent tasks, prompts, etc.
Next steps I can help with • Sample prompt/agent flow for your use case (moderation, transcription, summarization, etc.) • How to provide credentials securely on your self‑hosted server • Debug steps if you hit authentication or network errors Which would you like next?
t
I can use these as Voice Agent LLMs right?
t
Yes — you can use Azure OpenAI models as the LLM for Voice Agents in a self‑deployed LiveKit via the LiveKit Agents framework. What to know and next steps: • Use the Azure OpenAI plugin and configure
azure_endpoint
,
azure_deployment
, and credentials (API key or Microsoft Entra token). • Ensure your Voice Agent flow sends audio (or transcriptions) to the LLM as text prompts and receives text responses to convert to speech. LiveKit Agents handles the LLM integration; text-to-speech (TTS) must be implemented separately (you can use Azure TTS or another TTS service). • Securely provide credentials on your self-hosted server (environment variables or secret store). Would you like: • a concrete example that includes audio → transcription → LLM prompt → TTS, or • a minimal code snippet showing how to wire Azure OpenAI into a Voice Agent session?