generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

[Bug]: Incorrect PROXY_URL in script.js for multimodal-live-api

Open heiko-hotz opened this issue 1 year ago • 2 comments

File Name

gemini/multimodal-live-api/websocket-demo-app/frontend/script.js

What happened?

The proxy URL is incorrect. For local setup it probably should be

const PROXY_URL = "ws://localhost:8080";

The Cloud Run option describes how to do it there, but if a user only wants to do local setup they won't read that and expect it to work.

I'd recommend either setting a default proxy URL that works for local setup (preferred) or point the user in the README in the section for local setup to the code where they need to make a change.

Relevant log output

window.addEventListener("load", (event) => {
    console.log("Hello Gemini Realtime Demo!");

    setAvalibleCamerasOptions();
    setAvalibleMicrophoneOptions();
});


const PROXY_URL = "wss://[THE_URL_YOU_COPIED_WITHOUT_HTTP]";

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

heiko-hotz avatar Dec 20 '24 11:12 heiko-hotz

please note that #1569 only fixes #1568 . this is a separate issue

heiko-hotz avatar Dec 20 '24 17:12 heiko-hotz

yes, that's still 8000 instead of 8080 (https://github.com/GoogleCloudPlatform/generative-ai/tree/main/gemini/multimodal-live-api/websocket-demo-app). after some debugging i figured out that it should be 8080 instead of 8000.

Image

sartq333 avatar Feb 19 '25 14:02 sartq333