-
Notifications
You must be signed in to change notification settings - Fork 546
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
Support for Realtime API with Azure OpenAI #848
Conversation
🦋 Changeset detectedLatest commit: da3b054 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good - I didn't test this one. I think we should consider just making the example work automatically either way based on env var detection. I made that change in the JS one while testing it and it felt good to me. lmk what you think
sure, we can do that! which env var do you think we should switch on? |
I went with endpoint in https://github.com/livekit/agents-js/pull/97/files#diff-8a3cd674863fd6f2a24d4dfc3f6b151e66623fb99bbb0738ca45b75a76ddf906R17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/realtime/realtime_model.py
Outdated
Show resolved
Hide resolved
IMO Azure shouldn't be implicitly used. Users must specify |
# azure_deployment="<model-deployment>", | ||
# azure_endpoint="wss://<endpoint>.openai.azure.com/", # or AZURE_OPENAI_ENDPOINT | ||
# api_key="<api-key>", # or AZURE_OPENAI_API_KEY | ||
# api_version="2024-10-01-preview", # or OPENAI_API_VERSION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is azure specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is weird but this is what the official OpenAI sdk is using
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping the same env vars since this is what is being documented on their docs
No description provided.