Azure-Samples / Azure-Samples/aisearch-openai-rag-audio

Issue with azure open ai resource

Open
#97 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
561
Forks
355
PR merge metrics
No merged PRs in 30d

Description

Hi.

we have got this issue. Whenever the page load in local environment I got this issue. I followed the same from the github repo.

` File "C:\MyWorkspace\Python\aisearch-openai-rag-audio-main\.venv\lib\site-packages\aiohttp\web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
File "C:\MyWorkspace\Python\aisearch-openai-rag-audio-main\.venv\lib\site-packages\aiohttp\web_app.py", line 543, in _handle
resp = await handler(request)
File "C:\MyWorkspace\Python\aisearch-openai-rag-audio-main\app\backend\rtmt.py", line 226, in _websocket_handler
await self._forward_messages(ws)
File "C:\MyWorkspace\Python\aisearch-openai-rag-audio-main\app\backend\rtmt.py", line 193, in _forward_messages
async with session.ws_connect("/openai/realtime", headers=headers, params=params) as target_ws:
File "C:\MyWorkspace\Python\aisearch-openai-rag-audio-main\.venv\lib\site-packages\aiohttp\client.py", line 1194, in __aenter__
self._resp = await self._coro
File "C:\MyWorkspace\Python\aisearch-openai-rag-audio-main\.venv\lib\site-packages\aiohttp\client.py", line 848, in _ws_connect
raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 401, message='Invalid response status', url=URL('https://xxxx.openai.azure.com/openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-mini-realtime-preview')`

Contributor guide

Open the contributing guide

Research direction

Start in app/backend/rtmt.py at _forward_messages around line 193 and reproduce the local page-load failure. Inspect the headers and params used for the /openai/realtime websocket against the Azure OpenAI resource and deployment; done means the websocket handshake succeeds without the 401 response.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
ai, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.