Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: updates to clarify cloud shell usage, fixes #1581 #1582

Merged
merged 2 commits into from
Dec 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gemini/multimodal-live-api/websocket-demo-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ You can set up this app locally or via Cloud Shell.
- Click on Web Preview (to the right of the Open Terminal button near the top)
- Click "Preview on port 8080" (the port where you've setup the proxy server in the previous step)
- Copy the URL, but make sure to discard everything at the end after "cloudshell.dev/"
- Navigate to `const URL = "ws://localhost:8080";` in `index.html` on line 116
- Navigate to `const PROXY_URL = "wss://your websocket server";` in `script.js`
- Navigate to `const PROXY_URL = "wss://your websocket server";` in `frontend/script.js` on line 8
- Replace `wss://your websocket server` with `wss://[THE_URL_YOU_COPIED_WITHOUT_HTTP]`. For example, it should look like: `const PROXY_URL = "wss://8080-cs-123456789-default.cs-us-central1-abcd.cloudshell.dev";`
- Replace `your project id` with your project ID on line 9, for the `const PROJECT_ID`
- save the changes you've made to script.js
ghchinoy marked this conversation as resolved.
Show resolved Hide resolved

1. Start the frontend:
In the second terminal window, run the command below. Keep the backend server running in the first terminal.
(Make sure you have navigated to the folder containing the code files, i.e. using `cd your_folder_name`)
(Make sure you have navigated to the folder containing the code files, i.e. using `cd frontend`)

```sh
cd frontend
ghchinoy marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -157,7 +157,7 @@ You can set up this app locally or via Cloud Shell.
```

- Copy your access token and paste it in the Access Token field in the UI.
- In the second field with the model ID, change `YOUR-PROJECT-ID` to your actual Google Cloud project ID. For example, it should look like: `projects/my-project-id/locations/us-central1/publishers/google/models/gemini-2.0-flash-exp`
- In the second field of the UI, labeled Project ID, add your Google Cloud Project ID
- Press the "Connect" button. Now you should be able to interact with Gemini 2.0 with the Multimodal Live API.

1. To interact with the app, you can do the following:
Expand Down
Loading