wooden-dream-294
08/19/2025, 9:04 AMtall-airline-16756
08/19/2025, 9:04 AMtall-airline-16756
08/19/2025, 9:05 AMOPENAI_BASE_URL
environment variable. This acts as a handy fallback if you don’t specify a base URL directly in your code. For example:
import os
API_BASE_URL = os.getenv('OPENAI_BASE_URL', '<DEFAULT_API_BASE_URL>')
• Per-Instance Configuration: You can also set the base URL when you create instances for integrations like Ollama or Letta. Here’s how that looks:
from livekit.plugins import openai
session = AgentSession(
llm=openai.LLM.with_ollama(
model="llama3.1",
base_url="<CUSTOM_BASE_URL>",
),
)
If you want, I’m here to help with any specific integration or deployment questions you have—just let me know!