Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions examples/Agents_Function_Calling_Barista_Bot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"id": "zFjRBXVrAdYB"
},
"source": [
"To run this notebook, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you are running in a different environment, you can store your key in an environment variable. See [Authentication](../quickstarts/Authentication.ipynb) to learn more."
"To run this notebook, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you are running in a different environment, you can store your key in an environment variable. See [Authentication](../quickstarts/Authentication.ipynb) to learn more."
]
},
{
Expand All @@ -84,7 +84,7 @@
"from google import genai\n",
"from google.colab import userdata\n",
"\n",
"client = genai.Client(api_key=userdata.get(\"GOOGLE_API_KEY\"))"
"client = genai.Client(api_key=userdata.get(\"GEMINI_API_KEY\"))"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Analyze_a_Video_Classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"source": [
"## Configure your API key\n",
"\n",
"To run the following cell, your API key must be stored in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -84,7 +84,7 @@
"from google.colab import userdata\n",
"from google import genai\n",
"\n",
"API_KEY = userdata.get('GOOGLE_API_KEY')\n",
"API_KEY = userdata.get('GEMINI_API_KEY')\n",
"client = genai.Client(api_key=API_KEY)"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/Analyze_a_Video_Historic_Event_Recognition.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"source": [
"## Configure your API key\n",
"\n",
"To run the following cell, your API key must be stored in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -95,7 +95,7 @@
"from google import genai\n",
"from google.colab import userdata\n",
"\n",
"API_KEY = userdata.get('GOOGLE_API_KEY')\n",
"API_KEY = userdata.get('GEMINI_API_KEY')\n",
"client = genai.Client(api_key=API_KEY)"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/Analyze_a_Video_Summarization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"source": [
"## Configure your API key\n",
"\n",
"To run the following cell, your API key must be stored in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -84,7 +84,7 @@
"from google.colab import userdata\n",
"from google import genai\n",
"\n",
"API_KEY = userdata.get('GOOGLE_API_KEY')\n",
"API_KEY = userdata.get('GEMINI_API_KEY')\n",
"client = genai.Client(api_key=API_KEY)"
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/Animated_Story_Video_Generation_gemini.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"source": [
"## Set up your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named GOOGLE_API_KEY. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/22859a9f498b6de9d8fe4a33161bcdd3f713d5e8/quickstarts/Authentication.ipynb) for an example"
"To run the following cell, your API key must be stored it in a Colab Secret named GEMINI_API_KEY. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/22859a9f498b6de9d8fe4a33161bcdd3f713d5e8/quickstarts/Authentication.ipynb) for an example"
]
},
{
Expand All @@ -118,7 +118,7 @@
"from google.colab import userdata\n",
"import os\n",
"\n",
"os.environ['GOOGLE_API_KEY']=userdata.get('GOOGLE_API_KEY')"
"os.environ['GEMINI_API_KEY']=userdata.get('GEMINI_API_KEY')"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Anomaly_detection_with_embeddings.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"id": "Yi0kitgd5aLG"
},
"source": [
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
]
},
{
Expand All @@ -102,7 +102,7 @@
"# Used to securely store your API key\n",
"from google.colab import userdata\n",
"from google import genai\n",
"API_KEY = userdata.get(\"GOOGLE_API_KEY\")\n",
"API_KEY = userdata.get(\"GEMINI_API_KEY\")\n",
"client = genai.Client(api_key=API_KEY)"
]
},
Expand Down
6 changes: 3 additions & 3 deletions examples/Apollo_11.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"source": [
"### Setup your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -91,8 +91,8 @@
"from google.colab import userdata\n",
"from google import genai\n",
"\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to the Google Python Style Guide (and PEP 8), please add a space around the assignment operator.1

Suggested change
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')\n",

Style Guide References

Footnotes

  1. The repository's style guide refers to the Google Python Style Guide, which recommends using spaces around operators for better readability. This is a standard convention in Python.

"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/Book_illustration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"source": [
"### Setup your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -150,7 +150,7 @@
"source": [
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')"
]
},
{
Expand All @@ -175,7 +175,7 @@
"from google import genai\n",
"from google.genai import types\n",
"\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/Browser_as_a_tool.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"source": [
"### Set up your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
]
},
{
Expand All @@ -129,7 +129,7 @@
"import os\n",
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY = userdata.get('GOOGLE_API_KEY')"
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')"
]
},
{
Expand All @@ -153,7 +153,7 @@
"source": [
"from google.genai import types\n",
"\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)\n",
"client = genai.Client(api_key=GEMINI_API_KEY)\n",
"\n",
"LIVE_MODEL = 'gemini-2.0-flash-live-001' # @param ['gemini-2.0-flash-live-001', 'gemini-live-2.5-flash-preview', 'gemini-2.5-flash-preview-native-audio-dialog', 'gemini-2.5-flash-exp-native-audio-thinking-dialog'] {allow-input: true, isTemplate: true}\n",
"MODEL = 'gemini-2.5-flash' # @param ['gemini-2.5-flash'] {allow-input: true, isTemplate: true}"
Expand Down
6 changes: 3 additions & 3 deletions examples/Entity_Extraction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"source": [
"## Configure your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -95,8 +95,8 @@
"from google import genai\n",
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to the Google Python Style Guide (and PEP 8), please add a space around the assignment operator.1

Suggested change
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')\n",

Style Guide References

Footnotes

  1. The repository's style guide refers to the Google Python Style Guide, which recommends using spaces around operators for better readability. This is a standard convention in Python.

"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions examples/Google_IO2025_Live_Coding.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"source": [
"### Setup your API key\n",
"\n",
"To authenticate your requests with the Gemini API, you need an API key. This key allows you to access Google's powerful generative AI models. It's recommended to store your API key securely, for instance, as a Colab Secret named `GOOGLE_API_KEY`.\n",
"To authenticate your requests with the Gemini API, you need an API key. This key allows you to access Google's powerful generative AI models. It's recommended to store your API key securely, for instance, as a Colab Secret named `GEMINI_API_KEY`.\n",
"\n",
"If you don't already have an API key or you aren't sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
]
Expand All @@ -118,7 +118,7 @@
"source": [
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY = userdata.get('GOOGLE_API_KEY')"
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')"
]
},
{
Expand All @@ -145,7 +145,7 @@
"from google.genai import types\n",
"from IPython.display import Video, HTML, Markdown, Image\n",
"\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down Expand Up @@ -3226,7 +3226,7 @@
"tools = []\n",
"tools.append(types.Tool(url_context=types.UrlContext))\n",
"\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)\n",
"client = genai.Client(api_key=GEMINI_API_KEY)\n",
"config = types.GenerateContentConfig(\n",
" tools=tools,\n",
")\n",
Expand Down Expand Up @@ -4027,7 +4027,7 @@
"from google.adk.sessions import InMemorySessionService\n",
"\n",
"\n",
"os.environ[\"GOOGLE_API_KEY\"] = GOOGLE_API_KEY\n",
"os.environ[\"GEMINI_API_KEY\"] = GEMINI_API_KEY\n",
"os.environ[\"GOOGLE_GENAI_USE_VERTEXAI\"] = \"False\""
]
},
Expand Down
4 changes: 2 additions & 2 deletions examples/Guess_the_shape.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
"outputs": [],
"source": [
"from google.colab import userdata\n",
"GOOGLE_API_KEY = userdata.get('GOOGLE_API_KEY')\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')\n",
"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/LiveAPI_plotting_and_mapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"source": [
"### Set up your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
]
},
{
Expand All @@ -113,7 +113,7 @@
"import os\n",
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY = userdata.get('GOOGLE_API_KEY')"
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')"
]
},
{
Expand All @@ -135,7 +135,7 @@
},
"outputs": [],
"source": [
"uri = f\"wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent?key={GOOGLE_API_KEY}\"\n",
"uri = f\"wss://generativelanguage.googleapis.com/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent?key={GEMINI_API_KEY}\"\n",
"model = \"models/gemini-2.5-flash-native-audio-preview-09-2025\""
]
},
Expand Down
6 changes: 3 additions & 3 deletions examples/Market_a_Jet_Backpack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"id": "55qIbUyLuLTS"
},
"source": [
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
]
},
{
Expand All @@ -97,8 +97,8 @@
"from google import genai\n",
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to the Google Python Style Guide (and PEP 8), please add a space around the assignment operator.1

Suggested change
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')\n",

Style Guide References

Footnotes

  1. The repository's style guide refers to the Google Python Style Guide, which recommends using spaces around operators for better readability. This is a standard convention in Python.

"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/Opossum_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"source": [
"## Set up your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/gemini-api-cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
]
},
{
Expand All @@ -96,8 +96,8 @@
"from google.genai.types import GenerateContentConfig\n",
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to the Google Python Style Guide (and PEP 8), please add a space around the assignment operator.1

Suggested change
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')\n",

Style Guide References

Footnotes

  1. The repository's style guide refers to the Google Python Style Guide, which recommends using spaces around operators for better readability. This is a standard convention in Python.

"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"source": [
"from google import genai\n",
"from google.colab import userdata\n",
"api_key = userdata.get(\"GOOGLE_API_KEY\") # If you are not using Colab you can set the API key directly\n",
"api_key = userdata.get(\"GEMINI_API_KEY\") # If you are not using Colab you can set the API key directly\n",
"\n",
"# Create a client\n",
"client = genai.Client(api_key=api_key)\n",
Expand Down
6 changes: 3 additions & 3 deletions examples/Search_Wikipedia_using_ReAct.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
"id": "SAvjxTybuWw-"
},
"source": [
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see the [Authentication](https://github.com/google-gemini/cookbook/blob/main/quickstarts/Authentication.ipynb) quickstart for an example."
]
},
{
Expand All @@ -178,8 +178,8 @@
"outputs": [],
"source": [
"from google.colab import userdata\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
"genai.configure(api_key=GOOGLE_API_KEY)"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to the Google Python Style Guide (and PEP 8), please add a space around the assignment operator.1

Suggested change
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')\n",
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')\n",

Style Guide References

Footnotes

  1. The repository's style guide refers to the Google Python Style Guide, which recommends using spaces around operators for better readability. This is a standard convention in Python.

"genai.configure(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions examples/Search_grounding_for_research_report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"source": [
"### Setup your API key\n",
"\n",
"To run the following cell, your API key must be stored it in a Colab Secret named `GOOGLE_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
"To run the following cell, your API key must be stored it in a Colab Secret named `GEMINI_API_KEY`. If you don't already have an API key, or you're not sure how to create a Colab Secret, see [Authentication](../quickstarts/Authentication.ipynb) for an example."
]
},
{
Expand All @@ -116,7 +116,7 @@
"source": [
"from google.colab import userdata\n",
"\n",
"GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')"
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and adherence to the Google Python Style Guide (and PEP 8), please add a space around the assignment operator.1

Suggested change
"GEMINI_API_KEY=userdata.get('GEMINI_API_KEY')"
"GEMINI_API_KEY = userdata.get('GEMINI_API_KEY')"

Style Guide References

Footnotes

  1. The repository's style guide refers to the Google Python Style Guide, which recommends using spaces around operators for better readability. This is a standard convention in Python.

]
},
{
Expand Down Expand Up @@ -163,7 +163,7 @@
},
"outputs": [],
"source": [
"client = genai.Client(api_key=GOOGLE_API_KEY)"
"client = genai.Client(api_key=GEMINI_API_KEY)"
]
},
{
Expand Down
Loading
Loading