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

Connecting to the frontend via network #26

Open m4xwe11o opened 6 days ago

m4xwe11o commented 6 days ago

Ahoi everyone, I stumbled upon this amazing demo and wanted to try it out. The setup of all Azure resources worked when deployed in East US 2. I wonder if and how the local deployment can be accessed over the network.

image

I have setup the local deployment on a debian 12 VM and can see that the webserver (I suppose the frontend) is reseting the connection when trying to connect. I can see that the server is running:

image

Great work! Cheers

pamelafox commented 6 days ago

Sorry, do you mean that you are trying to interact with it via command-line? The development server does work locally for me.

m4xwe11o commented 6 days ago

Ahoi I try to connect to the server via http://192.168.10.56:8765 from my device which has 10.0.0.210 - there does not seem to be a network issue because I can see that the server is sending a TCP RST when i try to open the webpage

manekinekko commented 5 days ago

@m4xwe11o currently the frontend dev server binds to 127.0.0.1 https://github.com/Azure-Samples/aisearch-openai-rag-audio/blob/98a496eec70d0a2d4da1dc88df0a6ae35ec93f98/app/frontend/package.json#L7

Can you try starting the frontend app using vite --host 0.0.0.0 this will bind to all available local network interfaces.

m4xwe11o commented 3 days ago

Ahoi, thank you for your feedback. I tried changing the bind:

debian@debian:~/aisearch-openai-rag-audio$ cat app/frontend/package.json
{ 
  "name": "frontend",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite --host 0.0.0.0",
    "build": "tsc -b && vite build",
    "preview": "vite preview",
    "format": "prettier --write ./src"
  },
  "dependencies": {
    "@radix-ui/react-label": "^2.1.0",
    "@radix-ui/react-select": "^2.1.1",
    "@radix-ui/react-slider": "^1.2.0",
    "@radix-ui/react-slot": "^1.1.0",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "framer-motion": "^11.5.6",
    "i18next": "^23.12.2",
    "i18next-browser-languagedetector": "^8.0.0",
    "i18next-http-backend": "^2.5.2",
    "lucide-react": "^0.445.0",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-i18next": "^15.0.0",
    "react-use-websocket": "^4.8.1",
    "tailwind-merge": "^2.5.2",
    "tailwindcss-animate": "^1.0.7"
  },
  "devDependencies": {
    "@types/node": "^22.5.5",
    "@types/react": "^18.3.3",
    "@types/react-dom": "^18.3.0",
    "@vitejs/plugin-react": "^4.3.1",
    "autoprefixer": "^10.4.20",
    "postcss": "^8.4.47",
    "prettier": "^3.3.3",
    "prettier-plugin-tailwindcss": "^0.6.8",
    "tailwindcss": "^3.4.12",
    "typescript": "^5.5.3",
    "vite": "^5.4.8"
  }
}

Unfortunately the server can not be reached from over the network... Is there sth else that i should check to make this work... I'm really curious to get it working via remote access.

BR Maximilian