Skip to content

Commit 8cf3fc4

Browse files
committed
Note on notebook execution cost added for all notebooks
1 parent e607380 commit 8cf3fc4

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

lesson-2/L2_colab_prompting_and_parameters.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "markdown",
29-
"id": "59549527-e0d7-4534-8450-5b4112bf25cd",
29+
"id": "4469de0d-c177-4c70-bd61-997abf0d2413",
3030
"metadata": {},
3131
"source": [
3232
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
@@ -43,7 +43,7 @@
4343
"source": [
4444
"# Cost Estimate\n",
4545
"\n",
46-
"Running this notebook using your Google Cloud account will result in charges. Learn more about Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing).\n"
46+
"The estimated cost for running this notebook once using your Google Cloud account, without the video segment (which has been converted to markdown), should be less than 0.10 USD (as of August 2024). Get the latest Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing).\n"
4747
]
4848
},
4949
{
@@ -1377,7 +1377,7 @@
13771377
"tags": []
13781378
},
13791379
"source": [
1380-
"This cell is converted to markdown to prevent accidentally executing it. The cost to run this cell is approximately 0.12 USD.\n",
1380+
"**Note:** This cell is converted to markdown to prevent accidentally executing it. The cost to run this cell is approximately 0.12 USD (as of August 2024).\n",
13811381
"\n",
13821382
"```Python\n",
13831383
"responses_4 = multimodal_model.generate_content(contents_video, stream=True)\n",

lesson-4/L4_colab_images.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "markdown",
29-
"id": "c845b096-c793-4ad7-9a3e-55522333321e",
29+
"id": "e59a5f60-5fc2-4222-a067-aad628a54d73",
3030
"metadata": {},
3131
"source": [
3232
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
@@ -43,7 +43,7 @@
4343
"source": [
4444
"# Cost Estimate\n",
4545
"\n",
46-
"Running this notebook using your Google Cloud account will result in charges. Learn more about Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing).\n"
46+
"The estimated cost for running this notebook once using your Google Cloud account should be less than 0.10 USD (as of August 2024). Get the latest Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing).\n"
4747
]
4848
},
4949
{

lesson-5/L5_colab_videos.ipynb

+22-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "markdown",
29-
"id": "2108d112-4b51-40ec-bee7-02dd9d7a6d2d",
29+
"id": "d16354bd-ca40-4f17-a6b6-384a63a99dc7",
3030
"metadata": {},
3131
"source": [
3232
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
@@ -43,7 +43,7 @@
4343
"source": [
4444
"# Cost Estimate\n",
4545
"\n",
46-
"Running this notebook using your Google Cloud account will result in charges. Learn more about Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing)."
46+
"The estimated cost of running this notebook once using your Google Cloud account, using `Gemini 1.5 Flash`, without \"Finding a Needle in a Haystack\" example (which has been converted to markdown) should be less than 0.20 USD (as of August 2024). Get the latest Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing)."
4747
]
4848
},
4949
{
@@ -246,7 +246,17 @@
246246
"- Load the `gemini-pro-vision` model.\n",
247247
"- When specifying `gemini-pro-vision`, the [gemini-1.0-pro-vision](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemini-pro-vision) model is used.\n",
248248
"\n",
249-
"**Note:** In the video, `gemini-pro-vision` was used, which you can do so as well. Or use `gemini-1.5-flash-001`, which is dramatically cheaper than `gemini-pro-vision`. You can take a look at pricing [here](https://cloud.google.com/vertex-ai/generative-ai/pricing)."
249+
"**Note:** In the video, `gemini-pro-vision` was used, which you can do so as well. Or use `gemini-1.5-flash-001`, which is dramatically less cheaper than `gemini-pro-vision`. You can take a look at pricing [here](https://cloud.google.com/vertex-ai/generative-ai/pricing)."
250+
]
251+
},
252+
{
253+
"cell_type": "markdown",
254+
"id": "036be85c-2783-4930-ba11-1943e1229c80",
255+
"metadata": {},
256+
"source": [
257+
"```Python\n",
258+
"multimodal_model = GenerativeModel(\"gemini-pro-vision\")\n",
259+
"```"
250260
]
251261
},
252262
{
@@ -259,8 +269,6 @@
259269
},
260270
"outputs": [],
261271
"source": [
262-
"# multimodal_model = GenerativeModel(\"gemini-pro-vision\")\n",
263-
"\n",
264272
"multimodal_model = GenerativeModel(\"gemini-1.5-flash-001\")"
265273
]
266274
},
@@ -1140,7 +1148,11 @@
11401148
"source": [
11411149
"- Load the [gemini-1.5-pro-001](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemini-pro-preview-0409) model.\n",
11421150
"\n",
1143-
"- **Note:** In the video, `gemini-pro-vision` was used, which you can do so as well. Or use `gemini-1.5-flash-001`, which is dramatically cheaper than `gemini-pro-vision`. You can take a look at pricing [here](https://cloud.google.com/vertex-ai/generative-ai/pricing)."
1151+
"<span style=\"color:red; font-weight:bold;\">IMPORTANT ⚠️ : For this example, `gemini-1.5-pro-001` was used in the lecture video</span>\n",
1152+
"\n",
1153+
"<span style=\"color:red; font-weight:bold;\"> - PROMPTING THIS NEEDLE IN A HAYSTACK EXAMPLE SHOULD COST LESS THAN 5.0 USD PER EXECUTION WITH `gemini-1.5-pro-001` (as of August 2024). </span>\n",
1154+
"\n",
1155+
"<span style=\"color:green; font-weight:bold;\"> - Using `gemini-1.5-flash-001` instead should cost less than 0.25 USD (as of August 2024) per execution. </span>"
11441156
]
11451157
},
11461158
{
@@ -1153,7 +1165,9 @@
11531165
},
11541166
"outputs": [],
11551167
"source": [
1156-
"multimodal_model = GenerativeModel(\"gemini-1.5-pro-001\")"
1168+
"# multimodal_model = GenerativeModel(\"gemini-1.5-pro-001\")\n",
1169+
"\n",
1170+
"multimodal_model = GenerativeModel(\"gemini-1.5-flash-001\")"
11571171
]
11581172
},
11591173
{
@@ -1361,7 +1375,7 @@
13611375
"id": "fab0a1be-1035-4648-9aa2-2b35e0766423"
13621376
},
13631377
"source": [
1364-
"<span style=\"color:red; font-weight:bold;\">IMPORTANT ⚠️ : PROMPTING THIS NEEDLE IN A HAYSTACK EXAMPLE COSTS ABOUT $4 PER EXECUTION WITH `gemini-1.5-pro-001` (as of August 2024). We have commented out the code to prevent accidental execution.</span>\n",
1378+
"**Note:** We have commented out the code to prevent accidental execution\n",
13651379
"\n",
13661380
"```Python\n",
13671381
"responses = multimodal_model.generate_content(\n",

lesson-6/L6_colab_function_calling.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "markdown",
29-
"id": "dfc8e666-08e4-4b03-b354-69f90a09c591",
29+
"id": "cd2cc7c0-7353-43ef-9fd1-c0280f78673f",
3030
"metadata": {},
3131
"source": [
3232
"<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
@@ -43,7 +43,7 @@
4343
"source": [
4444
"# Cost Estimate\n",
4545
"\n",
46-
"Running this notebook using your Google Cloud account will result in charges. Learn more about Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing)."
46+
"The estimated cost for running this notebook once using your Google Cloud account should be less than 0.10 USD (as of August 2024). Get the latest Gemini costs [here](https://cloud.google.com/vertex-ai/generative-ai/pricing).\n"
4747
]
4848
},
4949
{

0 commit comments

Comments
 (0)