From 68976cdb82cae2844cca476155d189c58531b8b4 Mon Sep 17 00:00:00 2001 From: Holt Skinner <13262395+holtskinner@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:46:23 -0600 Subject: [PATCH] chore: Update streamlit sample app to use default environment variables (#1722) --- gemini/sample-apps/gemini-streamlit-cloudrun/README.md | 2 +- gemini/sample-apps/gemini-streamlit-cloudrun/app.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gemini/sample-apps/gemini-streamlit-cloudrun/README.md b/gemini/sample-apps/gemini-streamlit-cloudrun/README.md index b63ed47e5a9..23bb409ff62 100644 --- a/gemini/sample-apps/gemini-streamlit-cloudrun/README.md +++ b/gemini/sample-apps/gemini-streamlit-cloudrun/README.md @@ -43,7 +43,7 @@ To run the Streamlit Application locally (on Cloud Shell), we need to perform th - If you are using [Vertex AI in express mode](https://cloud.google.com/vertex-ai/generative-ai/docs/start/express-mode/overview): ```bash - export VERTEX_AI_API_KEY='' # Change this + export GOOGLE_API_KEY='' # Change this ``` 3. To run the application locally, execute the following command: diff --git a/gemini/sample-apps/gemini-streamlit-cloudrun/app.py b/gemini/sample-apps/gemini-streamlit-cloudrun/app.py index 872cbe6a7cf..1b9db0975e9 100644 --- a/gemini/sample-apps/gemini-streamlit-cloudrun/app.py +++ b/gemini/sample-apps/gemini-streamlit-cloudrun/app.py @@ -9,7 +9,7 @@ from google.genai.types import GenerateContentConfig, Part import streamlit as st -API_KEY = os.environ.get("VERTEX_AI_API_KEY") +API_KEY = os.environ.get("GOOGLE_API_KEY") PROJECT_ID = os.environ.get("GOOGLE_CLOUD_PROJECT") LOCATION = os.environ.get("GOOGLE_CLOUD_REGION")