lively-coat-10905
10/22/2025, 10:19 AMtall-airline-16756
10/22/2025, 10:19 AMtall-airline-16756
10/22/2025, 10:20 AMlively-coat-10905
10/22/2025, 10:21 AMtall-airline-16756
10/22/2025, 10:21 AMpip install livekit-plugins-openai
2. Set Environment Variables:
AZURE_OPENAI_API_KEY=your-api-key
AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
OPENAI_API_VERSION=2024-10-01-preview
3. Use the with_azure Method:
from livekit.plugins import openai
llm = openai.LLM.with_azure(
model="gpt-4o",
azure_deployment="your-deployment-name",
azure_endpoint="https://your-endpoint.openai.azure.com/",
api_version="2024-10-01-preview",
api_key="your-api-key",
temperature=0.7
)
Once you've set this up, you can use the LLM in an AgentSession or even as a standalone service. If you have any questions or run into any issues, please feel free to reach out—I’m here to help!
Sources: Azure AI Services and LiveKit | LiveKit Docs | Azure OpenAI LLM plugin guide | LiveKit Docs | examples/voice_agents/realtime_load_chat_history.py | plugins/openai/src/llm.ts