Open hellangleZ opened 1 month ago
I also get the same error with recent code while running locally in my system
@pamelafox Can you help here please?
@hellangleZ The 429 error is the rate-limiting error, which often means you left it open in another tab or have been testing too much. Close any existing tabs, wait a few minutes, and try again.
@yogaavanade The 400 is a bit more ambiguous, it is either an authorization error or an incorrect deployment URL. Check that the URL in the traceback matches exactly what you see in the Portal - the same Azure OpenAI subdomain and deployment name. Then check that your logged in user account is the one that was granted the "Cognitive Services OpenAI User" role for that account. You can go into the Portal, open the Azure OpenAI account, click "Check my access" and view your roles there.
@pamelafox Thanks for taking time to answer The app was working fine on my local but for last couple of days, I get sporadic errors like 400 and 403. FYKI - I am launching VS Code Dev Container provision.
I checked deployment URL as well as the user permissions for me. It all looks good. As above, I am getting 403. Please help me
@yogaavanade Are you using the key approach? I assume so, since your logs would otherwise show:
INFO:voicerag:Running in development mode, loading from .env file
INFO:voicerag:Using AzureDeveloperCliCredential with tenant_id 1bd0d125-6c64-49d1-af0d-88fa60e18074
INFO:azure.identity._internal.decorators:AzureDeveloperCliCredential.get_token_info succeeded
INFO:azure.identity._internal.decorators:AzureDeveloperCliCredential.get_token succeeded
If you are using keys, then you need to make sure AZURE_OPENAI_API_KEY is the key that is associated with that exact OpenAI account. Sometimes I see issues where people have that set in their global environment from other projects, and its accidentally getting used in keyless projects. We should probably rename it AZURE_OPENAI_API_REALTIME_KEY to make that less likely.
I build it at a linux server, and this is the config, and I want to remote access the server, so I change the vite.js and app.py code which refer to localhost, I change it to 0.0.0.0
It could be remote accessed , but can't work, what is the potential bug or something, I can fix it
Please help and tell me how to fix ,Thanks
My .env
✓ 1994 modules transformed. ../backend/static/index.html 0.47 kB │ gzip: 0.31 kB ../backend/static/assets/index-D9kfBBXm.css 14.15 kB │ gzip: 3.77 kB ../backend/static/assets/index-C3cCngEW.js 398.62 kB │ gzip: 127.55 kB │ map: 1,482.38 kB ✓ built in 3.51s
Starting backend
INFO:voicerag:Running in development mode, loading from .env file ======== Running on http://0.0.0.0:8765 ======== (Press CTRL+C to quit) INFO:aiohttp.access:167.220.232.100 [24/Oct/2024:08:45:31 +0000] "GET / HTTP/1.1" 200 235 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" INFO:aiohttp.access:167.220.232.100 [24/Oct/2024:08:45:32 +0000] "GET /assets/index-D9kfBBXm.css HTTP/1.1" 200 237 "http://20.171.65.183:8765/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" INFO:aiohttp.access:167.220.232.100 [24/Oct/2024:08:45:32 +0000] "GET /assets/index-C3cCngEW.js HTTP/1.1" 200 253 "http://20.171.65.183:8765/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" INFO:aiohttp.access:167.220.232.100 [24/Oct/2024:08:45:33 +0000] "GET /favicon.ico HTTP/1.1" 200 252 "http://20.171.65.183:8765/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0" ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 208, in _websocket_handler await self._forward_messages(ws) File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 180, in _forward_messages async with session.ws_connect("/openai/realtime", headers=headers, params=params) as target_ws: File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 848, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url=URL('wss://dalle333.openai.azure.com/openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-realtime-preview') ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 208, in _websocket_handler await self._forward_messages(ws) File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 180, in _forward_messages async with session.ws_connect("/openai/realtime", headers=headers, params=params) as target_ws: File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 848, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url=URL('wss://dalle333.openai.azure.com/openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-realtime-preview') ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 208, in _websocket_handler await self._forward_messages(ws) File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 180, in _forward_messages async with session.ws_connect("/openai/realtime", headers=headers, params=params) as target_ws: File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 848, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url=URL('wss://dalle333.openai.azure.com/openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-realtime-preview') ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 208, in _websocket_handler await self._forward_messages(ws) File "/aml/aisearch-openai-rag-audio/app/backend/rtmt.py", line 180, in _forward_messages async with session.ws_connect("/openai/realtime", headers=headers, params=params) as target_ws: File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^ File "/aml/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 848, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url=URL('wss://dalle333.openai.azure.com/openai/realtime?api-version=2024-10-01-preview&deployment=gpt-4o-realtime-preview') INFO:aiohttp.access:157.55.39.225 [24/Oct/2024:08:47:41 +0000] "GET /robots.txt HTTP/1.1" 404 173 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36" INFO:aiohttp.access:52.167.144.233 [24/Oct/2024:08:47:51 +0000] "GET / HTTP/1.1" 200 235 "-" "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36" INFO:aiohttp.access:167.220.232.100 [24/Oct/2024:08:45:29 +0000] "GET /realtime HTTP/1.1" 101 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0"