|
26 | 26 | },
|
27 | 27 | {
|
28 | 28 | "cell_type": "markdown",
|
29 |
| - "id": "2108d112-4b51-40ec-bee7-02dd9d7a6d2d", |
| 29 | + "id": "d16354bd-ca40-4f17-a6b6-384a63a99dc7", |
30 | 30 | "metadata": {},
|
31 | 31 | "source": [
|
32 | 32 | "<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
|
|
43 | 43 | "source": [
|
44 | 44 | "# Cost Estimate\n",
|
45 | 45 | "\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)." |
47 | 47 | ]
|
48 | 48 | },
|
49 | 49 | {
|
|
246 | 246 | "- Load the `gemini-pro-vision` model.\n",
|
247 | 247 | "- 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",
|
248 | 248 | "\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 | + "```" |
250 | 260 | ]
|
251 | 261 | },
|
252 | 262 | {
|
|
259 | 269 | },
|
260 | 270 | "outputs": [],
|
261 | 271 | "source": [
|
262 |
| - "# multimodal_model = GenerativeModel(\"gemini-pro-vision\")\n", |
263 |
| - "\n", |
264 | 272 | "multimodal_model = GenerativeModel(\"gemini-1.5-flash-001\")"
|
265 | 273 | ]
|
266 | 274 | },
|
|
1140 | 1148 | "source": [
|
1141 | 1149 | "- Load the [gemini-1.5-pro-001](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/gemini-pro-preview-0409) model.\n",
|
1142 | 1150 | "\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>" |
1144 | 1156 | ]
|
1145 | 1157 | },
|
1146 | 1158 | {
|
|
1153 | 1165 | },
|
1154 | 1166 | "outputs": [],
|
1155 | 1167 | "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\")" |
1157 | 1171 | ]
|
1158 | 1172 | },
|
1159 | 1173 | {
|
|
1361 | 1375 | "id": "fab0a1be-1035-4648-9aa2-2b35e0766423"
|
1362 | 1376 | },
|
1363 | 1377 | "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", |
1365 | 1379 | "\n",
|
1366 | 1380 | "```Python\n",
|
1367 | 1381 | "responses = multimodal_model.generate_content(\n",
|
|
0 commit comments