Skip to content

Commit 7881a84

Browse files
authored
Cleaning some 1.5/2.0 references remaining (#966)
* Updating mentions to Gemini 2.0 and 1.5 to Gemini 2.5 models * Removing "redirection" notbooks since they are now quite old and hopefully not necessary
1 parent 7416eaf commit 7881a84

25 files changed

+67
-193
lines changed

examples/Object_detection.ipynb

Lines changed: 0 additions & 41 deletions
This file was deleted.

examples/Virtual_Try_On.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
"GCP_PROJECT_ID = userdata.get('GCP_PROJECT_ID')\n",
197197
"\n",
198198
"# Configure model.\n",
199-
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\",\"gemini-1.5-flash-latest\"] {\"allow-input\":true}"
199+
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\"] {\"allow-input\":true}"
200200
]
201201
},
202202
{

examples/json_capabilities/Text_Summarization.ipynb

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,27 @@
115115
"outputs": [
116116
{
117117
"data": {
118-
"text/markdown": "The flickering candlelight cast dancing shadows across Elara's face as she hunched over the ancient map. The vellum felt brittle beneath her fingertips, the ink faded and smudged with age. She traced a delicate line with her calloused finger, following a treacherous path winding through the jagged peaks of the Dragon's Tooth mountains. Elara, a cartographer by trade but an adventurer at heart, had spent years deciphering this cryptic document, rumored to lead to the lost city of Eldoria.\n\nEldoria, a civilization whispered about in hushed tones in the taverns of Whisperwind village, was said to have vanished overnight, leaving behind only legends of unimaginable riches and powerful magic. Skeptics dismissed it as a fanciful tale, a bedtime story spun to entertain children. But Elara knew better. She felt the truth of Eldoria resonating within her soul, a siren's call that echoed in her blood.\n\nThe map indicated a hidden passage, a forgotten route known only to the Eldorians, that bypassed the most dangerous parts of the mountains. According to the legends, the passage was guarded by a creature of stone and shadow, a protector tasked with preventing outsiders from defiling Eldoria's secrets. Elara shivered, not from fear, but from anticipation.\n\nGathering her supplies, Elara carefully packed dried rations, a waterskin, a bedroll, and her trusty map. She also included a small, intricately carved wooden flute, a gift from her grandfather, a skilled musician who believed that even the most fearsome beasts could be soothed by a beautiful melody. With a deep breath, she extinguished the candle and stepped out into the cool night air.\n\nHer journey began under the watchful gaze of the moon, a silver disc hanging high in the inky sky. As she trekked towards the Dragon's Tooth mountains, the landscape grew increasingly rugged. Towering cliffs loomed above, their peaks piercing the heavens like jagged teeth. The wind howled through the canyons, carrying with it the mournful cries of unseen creatures.\n\nDays turned into nights as Elara navigated the treacherous terrain. She battled fierce winds, scaled sheer rock faces, and forded icy streams. She encountered wild creatures, some hostile, others indifferent, but none as terrifying as the guardian of the hidden passage. Finally, after what felt like an eternity, she arrived at the foot of a colossal stone archway, partially concealed by a curtain of cascading vines. This, she knew, was the entrance to the forgotten route.\n\nAs Elara approached the archway, a deep rumbling sound echoed through the mountains. The ground beneath her feet trembled, and the vines covering the archway began to writhe and twist. Emerging from the shadows was a creature of immense size, its body composed of jagged rocks and swirling shadows. Its eyes glowed with an eerie green light, and its voice resonated with the weight of centuries. \"Turn back, mortal,\" it boomed, its words shaking the very air. \"Eldoria is not for you.\"\n\nElara stood her ground, her heart pounding in her chest. She knew that she couldn't defeat the creature in a physical battle. She reached into her satchel and pulled out the wooden flute. Closing her eyes, she took a deep breath and began to play. The notes, clear and pure, filled the air, weaving a melody of longing and hope, of courage and perseverance.\n\nThe creature of stone and shadow paused, its glowing eyes dimming slightly. The music seemed to resonate with its ancient soul, stirring memories of a time long past. As the final notes faded into the air, the creature slowly lowered its head. \"You have a kind heart, mortal,\" it rumbled. \"But Eldoria is cursed. Leave it be.\"\n\nElara nodded, her eyes filled with understanding. She realized that Eldoria's true riches were not material, but rather the wisdom and knowledge that its people had possessed. She turned and began her descent from the mountains, carrying with her a newfound respect for the legends she had sought to uncover. Though she didn't find gold or jewels, she discovered something far more valuable: the courage to follow her dreams and the wisdom to know when to turn back. The secrets of Eldoria would remain undisturbed, protected by the guardian and the echoes of a beautiful melody.\n",
118+
"text/markdown": [
119+
"The flickering candlelight cast dancing shadows across Elara's face as she hunched over the ancient map. The vellum felt brittle beneath her fingertips, the ink faded and smudged with age. She traced a delicate line with her calloused finger, following a treacherous path winding through the jagged peaks of the Dragon's Tooth mountains. Elara, a cartographer by trade but an adventurer at heart, had spent years deciphering this cryptic document, rumored to lead to the lost city of Eldoria.\n",
120+
"\n",
121+
"Eldoria, a civilization whispered about in hushed tones in the taverns of Whisperwind village, was said to have vanished overnight, leaving behind only legends of unimaginable riches and powerful magic. Skeptics dismissed it as a fanciful tale, a bedtime story spun to entertain children. But Elara knew better. She felt the truth of Eldoria resonating within her soul, a siren's call that echoed in her blood.\n",
122+
"\n",
123+
"The map indicated a hidden passage, a forgotten route known only to the Eldorians, that bypassed the most dangerous parts of the mountains. According to the legends, the passage was guarded by a creature of stone and shadow, a protector tasked with preventing outsiders from defiling Eldoria's secrets. Elara shivered, not from fear, but from anticipation.\n",
124+
"\n",
125+
"Gathering her supplies, Elara carefully packed dried rations, a waterskin, a bedroll, and her trusty map. She also included a small, intricately carved wooden flute, a gift from her grandfather, a skilled musician who believed that even the most fearsome beasts could be soothed by a beautiful melody. With a deep breath, she extinguished the candle and stepped out into the cool night air.\n",
126+
"\n",
127+
"Her journey began under the watchful gaze of the moon, a silver disc hanging high in the inky sky. As she trekked towards the Dragon's Tooth mountains, the landscape grew increasingly rugged. Towering cliffs loomed above, their peaks piercing the heavens like jagged teeth. The wind howled through the canyons, carrying with it the mournful cries of unseen creatures.\n",
128+
"\n",
129+
"Days turned into nights as Elara navigated the treacherous terrain. She battled fierce winds, scaled sheer rock faces, and forded icy streams. She encountered wild creatures, some hostile, others indifferent, but none as terrifying as the guardian of the hidden passage. Finally, after what felt like an eternity, she arrived at the foot of a colossal stone archway, partially concealed by a curtain of cascading vines. This, she knew, was the entrance to the forgotten route.\n",
130+
"\n",
131+
"As Elara approached the archway, a deep rumbling sound echoed through the mountains. The ground beneath her feet trembled, and the vines covering the archway began to writhe and twist. Emerging from the shadows was a creature of immense size, its body composed of jagged rocks and swirling shadows. Its eyes glowed with an eerie green light, and its voice resonated with the weight of centuries. \"Turn back, mortal,\" it boomed, its words shaking the very air. \"Eldoria is not for you.\"\n",
132+
"\n",
133+
"Elara stood her ground, her heart pounding in her chest. She knew that she couldn't defeat the creature in a physical battle. She reached into her satchel and pulled out the wooden flute. Closing her eyes, she took a deep breath and began to play. The notes, clear and pure, filled the air, weaving a melody of longing and hope, of courage and perseverance.\n",
134+
"\n",
135+
"The creature of stone and shadow paused, its glowing eyes dimming slightly. The music seemed to resonate with its ancient soul, stirring memories of a time long past. As the final notes faded into the air, the creature slowly lowered its head. \"You have a kind heart, mortal,\" it rumbled. \"But Eldoria is cursed. Leave it be.\"\n",
136+
"\n",
137+
"Elara nodded, her eyes filled with understanding. She realized that Eldoria's true riches were not material, but rather the wisdom and knowledge that its people had possessed. She turned and began her descent from the mountains, carrying with her a newfound respect for the legends she had sought to uncover. Though she didn't find gold or jewels, she discovered something far more valuable: the courage to follow her dreams and the wisdom to know when to turn back. The secrets of Eldoria would remain undisturbed, protected by the guardian and the echoes of a beautiful melody.\n"
138+
],
119139
"text/plain": [
120140
"<IPython.core.display.Markdown object>"
121141
]
@@ -128,7 +148,7 @@
128148
"source": [
129149
"from IPython.display import Markdown\n",
130150
"\n",
131-
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-1.5-flash-latest\",\"gemini-2.5-flash-lite-preview-06-17\",\"gemini-2.5-flash\",\"gemini-2.5-pro\"] {\"allow-input\":true}\n",
151+
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite,\"gemini-2.5-flash\",\"gemini-2.5-pro\"] {\"allow-input\":true}\n",
132152
"prompt = \"Generate a 10 paragraph fantasy story. Include at least 2 named characters and 2 named locations. Give as much detail in the story as possible.\"\n",
133153
"response = client.models.generate_content(\n",
134154
" model=MODEL_ID,\n",

quickstarts/Authentication.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@
116116
"name": "stdout",
117117
"output_type": "stream",
118118
"text": [
119-
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/200.0 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r",
120-
"\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m194.6/200.0 kB\u001b[0m \u001b[31m29.4 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r",
119+
"\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/200.0 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\n",
120+
"\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━\u001b[0m \u001b[32m194.6/200.0 kB\u001b[0m \u001b[31m29.4 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\n",
121121
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m200.0/200.0 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
122122
"\u001b[?25h"
123123
]
@@ -363,7 +363,7 @@
363363
"Or, if you're calling the API through your terminal using `cURL`, you can copy and paste this code to read your key from the environment variable.\n",
364364
"\n",
365365
"```\n",
366-
"curl \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GOOGLE_API_KEY\" \\\n",
366+
"curl \"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$GOOGLE_API_KEY\" \\\n",
367367
" -H 'Content-Type: application/json' \\\n",
368368
" -X POST \\\n",
369369
" -d '{\n",

quickstarts/Code_Execution.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@
763763
],
764764
"source": [
765765
"# Read the CSV file into a pandas DataFrame\n",
766-
"houses_data = pd.read_csv('houses.csv', nrows=5000) # only keeping the first 5000 entries to keep the request light (still 500k tokens). Use pro 1.5 to ingest the full dataset.\n",
766+
"houses_data = pd.read_csv('houses.csv', nrows=5000) # only keeping the first 5000 entries to keep the request light (still 500k tokens). Use pro models to ingest the full dataset.\n",
767767
"houses_data.to_csv('houses.csv', index=False)\n",
768768
"houses_data.head()"
769769
]

quickstarts/Counting_Tokens.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
},
229229
"outputs": [],
230230
"source": [
231-
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.5-flash\",\"gemini-2.5-pro\", \"gemini-2.0-flash\"] {\"allow-input\":true, isTemplate: true}"
231+
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\", \"gemini-2.5-flash-lite-preview-09-2025\", \"gemini-2.5-flash\", \"gemini-2.5-flash-preview-09-2025\", \"gemini-2.5-pro\", \"gemini-2.5-flash-image-preview\"] {\"allow-input\":true, isTemplate: true}"
232232
]
233233
},
234234
{

quickstarts/Error_handling.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"source": [
160160
"from google.api_core import retry\n",
161161
"\n",
162-
"MODEL_ID = \"gemini-2.0-flash\" # @param [\"gemini-2.5-flash-lite\",\"gemini-2.0-flash\",\"gemini-2.5-pro\"] {\"allow-input\":true, isTemplate: true}\n",
162+
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\", \"gemini-2.5-flash-lite-preview-09-2025\", \"gemini-2.5-flash\", \"gemini-2.5-flash-preview-09-2025\", \"gemini-2.5-pro\", \"gemini-2.5-flash-image-preview\"] {\"allow-input\":true, isTemplate: true}\n",
163163
"\n",
164164
"prompt = \"Write a story about a magic backpack.\"\n",
165165
"\n",
@@ -261,7 +261,7 @@
261261
"source": [
262262
"from google.api_core import retry, exceptions\n",
263263
"\n",
264-
"MODEL_ID = \"gemini-2.0-flash\" # @param [\"gemini-2.5-flash-lite-preview-06-17\",\"gemini-2.0-flash\",\"gemini-2.5-pro\"] {\"allow-input\":true, isTemplate: true}\n",
264+
"MODEL_ID = \"gemini-2.5-flash\" # @param [\"gemini-2.5-flash-lite\", \"gemini-2.5-flash-lite-preview-09-2025\", \"gemini-2.5-flash\", \"gemini-2.5-flash-preview-09-2025\", \"gemini-2.5-pro\", \"gemini-2.5-flash-image-preview\"] {\"allow-input\":true, isTemplate: true}\n",
265265
"\n",
266266
"@retry.Retry(\n",
267267
" predicate=retry.if_transient_error,\n",

quickstarts/Function_calling_config.ipynb

Lines changed: 0 additions & 67 deletions
This file was deleted.

quickstarts/Spatial_understanding.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
"\n",
166166
"Some features, like segmentation, only works with 2.5 models.\n",
167167
"\n",
168-
"You can try with the older ones but it might be more inconsistent (`gemini-1.5-flash-001` had the best results of the previous generation). The [Object detection](https://github.com/google-gemini/cookbook/blob/gemini-1.5-archive/examples/Object_detection.ipynb) contains good examples of what previous models were able to do.\n",
168+
"The [Object detection](https://github.com/google-gemini/cookbook/blob/gemini-1.5-archive/examples/Object_detection.ipynb) contains good examples of what previous models were able to do.\n",
169169
"\n",
170170
"For more information about all Gemini models, check the [documentation](https://ai.google.dev/gemini-api/docs/models/gemini) for extended information on each of them."
171171
]
@@ -203,7 +203,7 @@
203203
"bounding_box_system_instructions = \"\"\"\n",
204204
" Return bounding boxes as a JSON array with labels. Never return masks or code fencing. Limit to 25 objects.\n",
205205
" If an object is present multiple times, name them according to their unique characteristic (colors, size, position, unique characteristics, etc..).\n",
206-
" \"\"\""
206+
"\"\"\""
207207
]
208208
},
209209
{

0 commit comments

Comments
 (0)