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

ValueError: URL should be absolute #22

Closed ketanvh closed 1 week ago

ketanvh commented 1 week ago

Steps to follow

App started

Error in64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0" ERROR:aiohttp.server:Error handling request Traceback (most recent call last): File "/workspaces/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 "/workspaces/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/aisearch-openai-rag-audio/app/backend/rtmt.py", line 208, in _websocket_handler await self._forward_messages(ws) File "/workspaces/aisearch-openai-rag-audio/app/backend/rtmt.py", line 171, in _forward_messages async with aiohttp.ClientSession(base_url=self.endpoint) as session: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/aiohttp/client.py", line 248, in init self._base_url.origin() == self._base_url ^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/yarl/_url.py", line 563, in origin return self._origin ^^^^^^^^^^^^ File "src/propcache/_helpers_c.pyx", line 41, in propcache._helpers_c.under_cached_property.get File "/workspaces/aisearch-openai-rag-audio/.venv/lib/python3.12/site-packages/yarl/_url.py", line 573, in _origin raise ValueError("URL should be absolute") ValueError: URL should be absolute

Note:

Saw following error while building app

vite v5.4.8 building for production... node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error. node_modules/framer-motion/dist/es/motion/index.mjs (1:0): Error when using sourcemap for reporting an error: Can't resolve original location of error. ✓ 1937 modules transformed. ../backend/static/index.html 0.47 kB │ gzip: 0.31 kB ../backend/static/assets/index-MbNbqoGC.css 14.11 kB │ gzip: 3.75 kB ../backend/static/assets/index-C--kc_TS.js 316.59 kB │ gzip: 102.06 kB │ map: 1,216.15 kB ✓ built in 5.00s

pamelafox commented 1 week ago

Can you try logging out the endpoint that's being used? It seems like its incorrect, based on the error.

ketanvh commented 1 week ago

my bad.. its working. i forgot to add // in AZURE_OPENAI_ENDPOINT.

pamelafox commented 1 week ago

Great, closing!