Skip to content

feat: Support GPT Realtime GA API on Azure #5017

@dhansmair

Description

@dhansmair

Feature Type

I cannot use LiveKit without it

Feature Description

The Azure OpenAI GPT Realtime API is now Generally Available (GA).
According to the Azure documentation, the GPT Realtime GA API is now available and preview versions will be deprecated.

Is it currently possible to use livekit-agents with Azure OpenAI GPT Realtime?

I have tried various options to see if we can switch right now:

# Option 1
realtime_model = openai.realtime.RealtimeModel(
    base_url=AZURE_OPENAI_LLM_ENDPOINT,
    api_key=AZURE_OPENAI_LLM_API_KEY,
    model="gpt-realtime",
)

# Option 2
realtime_model = openai.realtime.RealtimeModel.with_azure(
    azure_deployment=AZURE_OPENAI_LLM_DEPLOYMENT,
    azure_endpoint=AZURE_OPENAI_LLM_ENDPOINT,
    api_key=AZURE_OPENAI_LLM_API_KEY,
)

but both attempts didn't work.

The Azure OpenAI GA API is supported by the offical openai Python SDK, that is why I thought the livekit openai (without the with_azure()) could work as well.

Workarounds / Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions