Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Azure] Support Realtime API #1287

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

deyaaeldeen
Copy link
Contributor

Support Azure Realtime API

In order to do so, this PR adds an azure factory method to OpenAIRealtimeWebSocket and OpenAIRealtimeWS classes that can handle asynchronous operations required during WebSocket connection setup.

Key Changes

1. New azure Method

  • Previously, the WebSocket connection was established in the class constructor, which could not handle async operations like fetching Azure AD tokens.
  • The new azure method enables asynchronous fetching of the Azure AD token and then pass it to the class constructor.

2. New _getAzureADToken Method in AzureOpenAI

  • Adds a _getAzureADToken method in the AzureOpenAI class to provide refreshed Azure AD tokens.

@deyaaeldeen deyaaeldeen force-pushed the feat/azure-rt-factory branch from e90657b to f2e649f Compare January 24, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant