Azure-Samples / aisearch-openai-rag-audio

A simple example implementation of the VoiceRAG pattern to power interactive voice generative AI experiences using RAG with Azure AI Search and Azure OpenAI's gpt-4o-realtime-preview model.
https://azure.microsoft.com/products/search
MIT License
211 stars 105 forks source link

wss path to Azure OpenAI corrected #6

Closed flo7up closed 3 weeks ago

flo7up commented 3 weeks ago

I believe the way how the url is constructed seems to be incorrect. The "api-version" is currently set to "alpha", which didn't work and led to 404 error. I have the audio GPT-4o model deployed in swedencentral.

I adjusted the constructed url to match with what is described in the Azure Sample repo: https://github.com/azure-samples/aoai-realtime-audio-sdk However, the sample repo seems also to have a slight error right now as the deployment needs to be "gpt-4o-realtime-preview" without the 1001 at the end.

So the url that i got to work is: wss://my-eastus2-openai-resource.openai.azure.com/openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-realtime-preview

For the future, it makes sense to load the variables from .env file.

chuwik commented 3 weeks ago

Thanks for your PR @flo7up! This has already been fixed in the main branch, if you pull latest you can run it. It also placed the deployment name in .env.