Repository: google-gemini/cookbook
Pull request #504: Migrating entity extraction and talk to documents example
Author: login: andycandy
Labels: name: status:awaiting review
description: PR awaiting review from a maintainer
name: component:examples
description: Issues/PR referencing examples folder
Created: 2025-03-04T21:15:45Z | Merged: 2025-03-31T08:35:46Z

Migrated a few more example to latest sdks


Diff:
diff --git a/examples/Entity_Extraction.ipynb b/examples/Entity_Extraction.ipynb
index a17f8fbd6..c70ec80e7 100644
--- a/examples/Entity_Extraction.ipynb
+++ b/examples/Entity_Extraction.ipynb
@@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
       },
       "source": [
-        "##### Copyright 2024 Google LLC."
+        "##### Copyright 2025 Google LLC."
       ]
     },
     {
@@ -50,7 +50,7 @@
         "id": "b04e5041d418"
       },
       "source": [
-        "<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Entity_Extraction.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/>"
+        "<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Entity_Extraction.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/></a>"
       ]
     },
     {
@@ -70,19 +70,7 @@
       },
       "outputs": [],
       "source": [
-        "%pip install -U -q \"google-generativeai>=0.7.2\""
-      ]
-    },
-    {
-      "cell_type": "code",
-      "execution_count": 3,
-      "metadata": {
-        "id": "4hDSLsOk2buH"
-      },
-      "outputs": [],
-      "source": [
-        "import google.generativeai as genai\n",
-        "from IPython.display import Markdown"
+        "%pip install -U -q \"google-genai>=1.0.0\""
       ]
     },
     {
@@ -98,45 +86,48 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 4,
+      "execution_count": 3,
       "metadata": {
         "id": "uwbcbjun2gb3"
       },
       "outputs": [],
       "source": [
+        "from google import genai\n",
         "from google.colab import userdata\n",
-        "GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
         "\n",
-        "genai.configure(api_key=GOOGLE_API_KEY)"
+        "GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
+        "client = genai.Client(api_key=GOOGLE_API_KEY)"
       ]
     },
     {
       "cell_type": "markdown",
       "metadata": {
-        "id": "ky3Njb3t0riS"
+        "id": "MdqFCJr7KG_d"
       },
       "source": [
-        "# Examples"
+        "# Select the model\n",
+        "\n",
+        "Additionally, select the model you want to use from the available options below:"
       ]
     },
     {
-      "cell_type": "markdown",
+      "cell_type": "code",
+      "execution_count": 4,
       "metadata": {
-        "id": "vV4RsTkJ2BAp"
+        "id": "5oc1zmBMKFdQ"
       },
+      "outputs": [],
       "source": [
-        "You will use Gemini 2.0 Flash model for fast responses."
+        "MODEL_ID = \"gemini-2.0-flash\"  # @param [\"gemini-2.0-flash-lite\", \"gemini-2.0-flash\", \"gemini-2.0-pro-exp-02-05\"] {\"allow-input\": true, \"isTemplate\": true}"
       ]
     },
     {
-      "cell_type": "code",
-      "execution_count": 5,
+      "cell_type": "markdown",
       "metadata": {
-        "id": "pjMaGHKm2iUH"
+        "id": "ky3Njb3t0riS"
       },
-      "outputs": [],
       "source": [
-        "model = genai.GenerativeModel('gemini-2.0-flash')"
+        "# Examples"
       ]
     },
     {
@@ -154,70 +145,81 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 6,
+      "execution_count": 5,
       "metadata": {
         "id": "Qc0w1Ylb7HQB"
       },
       "outputs": [],
       "source": [
-        "directions = \"\"\"To reach the Colosseum from Rome's Fiumicino Airport (FCO), your options are diverse.\n",
-        "Take the Leonardo Express train from FCO to Termini Station, then hop on metro line A towards Battistini and alight at Colosseo station.\n",
-        "Alternatively, hop on a direct bus, like the Terravision shuttle, from FCO to Termini, then walk a short distance to the Colosseum on Via dei Fori Imperiali.\n",
-        "If you prefer a taxi, simply hail one at the airport and ask to be taken to the Colosseum.\n",
-        "The taxi will likely take you through Via del Corso and Via dei Fori Imperiali.\n",
-        "A private transfer service offers a direct ride from FCO to the Colosseum, bypassing the hustle of public transport.\n",
-        "If you're feeling adventurous, consider taking the train from FCO to Ostiense station,\n",
-        "then walking through the charming Trastevere neighborhood, crossing Ponte Palatino to reach the Colosseum, passing by the Tiber River and Via della Lungara.\n",
-        "Remember to validate your tickets on the metro and buses, and be mindful of pickpockets, especially in crowded areas.\n",
-        "No matter which route you choose, you're sure to be awed by the grandeur of the Colosseum.\"\"\""
+        "directions = \"\"\"\n",
+        "  To reach the Colosseum from Rome's Fiumicino Airport (FCO),\n",
+        "  your options are diverse. Take the Leonardo Express train from FCO\n",
+        "  to Termini Station, then hop on metro line A towards Battistini and\n",
+        "  alight at Colosseo station.\n",
+        "  Alternatively, hop on a direct bus, like the Terravision shuttle, from\n",
+        "  FCO to Termini, then walk a short distance to the Colosseum on\n",
+        "  Via dei Fori Imperiali.\n",
+        "  If you prefer a taxi, simply hail one at the airport and ask to be taken\n",
+        "  to the Colosseum. The taxi will likely take you through Via del Corso and\n",
+        "  Via dei Fori Imperiali.\n",
+        "  A private transfer service offers a direct ride from FCO to the Colosseum,\n",
+        "  bypassing the hustle of public transport.\n",
+        "  If you're feeling adventurous, consider taking the train from\n",
+        "  FCO to Ostiense station, then walking through the charming\n",
+        "  Trastevere neighborhood, crossing Ponte Palatino to reach the Colosseum,\n",
+        "  passing by the Tiber River and Via della Lungara.\n",
+        "  Remember to validate your tickets on the metro and buses,\n",
+        "  and be mindful of pickpockets, especially in crowded areas.\n",
+        "  No matter which route you choose, you're sure to be awed by the\n",
+        "  grandeur of the Colosseum.\n",
+        "\"\"\""
+      ]
+    },
+    {
+      "cell_type": "markdown",
+      "metadata": {
+        "id": "KelZNWwSytWf"
+      },
+      "source": [
+        "You will use Gemini 2.0 Flash model for fast responses."
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": 7,
+      "execution_count": 6,
       "metadata": {
         "id": "bxPfNhRi-JsW"
       },
       "outputs": [
         {
           "data": {
-            "text/markdown": [
-              "```json\n",
-              "{\n",
-              "  \"Street\": [\n",
-              "    \"Via dei Fori Imperiali\",\n",
-              "    \"Via del Corso\",\n",
-              "    \"Via della Lungara\"\n",
-              "  ],\n",
-              "  \"Transport\": [\n",
-              "    \"train\",\n",
-              "    \"metro\",\n",
-              "    \"bus\",\n",
-              "    \"Terravision shuttle\",\n",
-              "    \"taxi\",\n",
-              "    \"private transfer service\"\n",
-              "  ]\n",
-              "}\n",
-              "```"
-            ],
+            "text/markdown": "```json\n{\n  \"Street\": [\n    \"Via dei Fori Imperiali\",\n    \"Via del Corso\",\n    \"Via dei Fori Imperiali\",\n    \"Via della Lungara\"\n  ],\n  \"Transport\": [\n    \"train\",\n    \"metro\",\n    \"bus\",\n    \"shuttle\",\n    \"taxi\",\n    \"private transfer service\",\n    \"public transport\",\n    \"train\"\n  ]\n}\n```",
             "text/plain": [
               "<IPython.core.display.Markdown object>"
             ]
           },
-          "execution_count": 7,
+          "execution_count": 6,
           "metadata": {},
           "output_type": "execute_result"
         }
       ],
       "source": [
+        "from IPython.display import Markdown\n",
+        "\n",
         "directions_prompt = f\"\"\"\n",
         "  From the given text, extract the following entities and return a list of them.\n",
         "  Entities to extract: street name, form of transport.\n",
         "  Text: {directions}\n",
         "  Street = []\n",
-        "  Transport = [] \"\"\"\n",
+        "  Transport = []\n",
+        "\"\"\"\n",
+        "\n",
+        "response = client.models.generate_content(\n",
+        "    model=MODEL_ID,\n",
+        "    contents=directions_prompt\n",
+        ")\n",
         "\n",
-        "Markdown(model.generate_content(directions_prompt).text)"
+        "Markdown(response.text)"
       ]
     },
     {
@@ -231,47 +233,40 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 8,
+      "execution_count": 7,
       "metadata": {
         "id": "DZdGgTsN5s6z"
       },
       "outputs": [
         {
           "data": {
-            "text/markdown": [
-              "Here are the extracted entities:\n",
-              "\n",
-              "**Street:**\n",
-              "- Via dei Fori Imperiali\n",
-              "- Via del Corso\n",
-              "- Via della Lungara \n",
-              "\n",
-              "**Transport:**\n",
-              "- Train (Leonardo Express)\n",
-              "- Metro (line A)\n",
-              "- Bus (Terravision shuttle)\n",
-              "- Taxi\n",
-              "- Private transfer service \n"
-            ],
+            "text/markdown": "Here's the extracted information:\n\nStreet = ['Via dei Fori Imperiali', 'Via del Corso', 'Via dei Fori Imperiali', 'Via della Lungara']\nTransport = ['train', 'metro', 'bus', 'shuttle', 'taxi', 'transfer service']\n",
             "text/plain": [
               "<IPython.core.display.Markdown object>"
             ]
           },
-          "execution_count": 8,
+          "execution_count": 7,
           "metadata": {},
           "output_type": "execute_result"
         }
       ],
       "source": [
         "directions_list_prompt = f\"\"\"\n",
-        "  From the given text, extract the following entities and return a list of them.\n",
+        "  From the given text, extract the following entities and\n",
+        "  return a list of them.\n",
         "  Entities to extract: street name, form of transport.\n",
         "  Text: {directions}\n",
         "  Return your answer as two lists:\n",
         "  Street = [street names]\n",
-        "  Transport = [forms of transport]\"\"\"\n",
+        "  Transport = [forms of transport]\n",
+        "\"\"\"\n",
         "\n",
-        "Markdown(model.generate_content(directions_list_prompt).text)"
+        "response = client.models.generate_content(\n",
+        "    model=MODEL_ID,\n",
+        "    contents=directions_list_prompt\n",
+        ")\n",
+        "\n",
+        "Markdown(response.text)"
       ]
     },
     {
@@ -287,43 +282,43 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 9,
+      "execution_count": 8,
       "metadata": {
         "id": "tkAi37jQoJFs"
       },
       "outputs": [],
       "source": [
         "customer_service_email = \"\"\"\n",
-        "Hello,\n",
-        "Thank you for reaching out to our customer support team regarding your recent purchase of our premium subscription service.\n",
-        "Your activation code has been sent to +87 668 098 344\n",
-        "Additionally, if you require immediate assistance, feel free to contact us directly at +1 (800) 555-1234.\n",
-        "Our team is available Monday through Friday from 9:00 AM to 5:00 PM PST.\n",
-        "For after-hours support, please call our dedicated emergency line at +87 455 555 678.\n",
-        "Thanks for your business and look forward to resolving any issues you may encounter promptly.\n",
-        "Thank you.\"\"\""
+        "  Hello,\n",
+        "  Thank you for reaching out to our customer support team regarding your\n",
+        "  recent purchase of our premium subscription service.\n",
+        "  Your activation code has been sent to +87 668 098 344\n",
+        "  Additionally, if you require immediate assistance, feel free to contact us\n",
+        "  directly at +1 (800) 555-1234.\n",
+        "  Our team is available Monday through Friday from 9:00 AM to 5:00 PM PST.\n",
+        "  For after-hours support, please call our\n",
+        "  dedicated emergency line at +87 455 555 678.\n",
+        "  Thanks for your business and look forward to resolving any issues\n",
+        "  you may encounter promptly.\n",
+        "  Thank you.\n",
+        "\"\"\""
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": 10,
+      "execution_count": 9,
       "metadata": {
         "id": "J_cHeX-wwmeN"
       },
       "outputs": [
         {
           "data": {
-            "text/markdown": [
-              "The phone numbers are:\n",
-              "- +87 668 098 344\n",
-              "- +1 (800) 555-1234\n",
-              "- +87 455 555 678 \n"
-            ],
+            "text/markdown": "```json\n[\n  \"+87 668 098 344\",\n  \"+1 (800) 555-1234\",\n  \"+87 455 555 678\"\n]\n```",
             "text/plain": [
               "<IPython.core.display.Markdown object>"
             ]
           },
-          "execution_count": 10,
+          "execution_count": 9,
           "metadata": {},
           "output_type": "execute_result"
         }
@@ -333,9 +328,15 @@
         "  From the given text, extract the following entities and return a list of them.\n",
         "  Entities to extract: phone numbers.\n",
         "  Text: {customer_service_email}\n",
-        "  Return your answer in a list:\"\"\"\n",
+        "  Return your answer in a list:\n",
+        "\"\"\"\n",
         "\n",
-        "Markdown(model.generate_content(phone_prompt).text)"
+        "response = client.models.generate_content(\n",
+        "    model=MODEL_ID,\n",
+        "    contents=phone_prompt\n",
+        ")\n",
+        "\n",
+        "Markdown(response.text)"
       ]
     },
     {
@@ -352,47 +353,51 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 11,
+      "execution_count": 10,
       "metadata": {
         "id": "J1Ufx9qkxPfJ"
       },
       "outputs": [],
       "source": [
         "url_text = \"\"\"\n",
-        "Gemini API billing FAQs\n",
+        "  Gemini API billing FAQs\n",
         "\n",
-        "This page provides answers to frequently asked questions about billing for the Gemini API. For pricing information, see the pricing page https://ai.google.dev/pricing.\n",
-        "For legal terms, see the terms of service https://ai.google.dev/gemini-api/terms#paid-services.\n",
+        "  This page provides answers to frequently asked questions about billing\n",
+        "  for the Gemini API. For pricing information, see the pricing page\n",
+        "  https://ai.google.dev/pricing.\n",
+        "  For legal terms, see the terms of service\n",
+        "  https://ai.google.dev/gemini-api/terms#paid-services.\n",
         "\n",
-        "What am I billed for?\n",
-        "Gemini API pricing is based on total token count, with different prices for input tokens and output tokens. For pricing information, see the pricing page https://ai.google.dev/pricing.\n",
+        "  What am I billed for?\n",
+        "  Gemini API pricing is based on total token count, with different prices\n",
+        "  for input tokens and output tokens. For pricing information,\n",
+        "  see the pricing page https://ai.google.dev/pricing.\n",
         "\n",
-        "Where can I view my quota?\n",
-        "You can view your quota and system limits in the Google Cloud console https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com/quotas.\n",
+        "  Where can I view my quota?\n",
+        "  You can view your quota and system limits in the Google Cloud console\n",
+        "  https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com/quotas.\n",
         "\n",
-        "Is GetTokens billed?\n",
-        "Requests to the GetTokens API are not billed, and they don't count against inference quota.\"\"\""
+        "  Is GetTokens billed?\n",
+        "  Requests to the GetTokens API are not billed,\n",
+        "  and they don't count against inference quota.\n",
+        "\"\"\""
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": 12,
+      "execution_count": 11,
       "metadata": {
         "id": "eaFWpN1IyOLW"
       },
       "outputs": [
         {
           "data": {
-            "text/markdown": [
-              "- https://ai.google.dev/pricing\n",
-              "- https://ai.google.dev/gemini-api/terms#paid-services\n",
-              "- https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com/quotas \n"
-            ],
+            "text/markdown": "```\n- https://ai.google.dev/pricing\n- https://ai.google.dev/gemini-api/terms#paid-services\n- https://console.cloud.google.com/apis/api/generativelanguage.googleapis.com/quotas\n```",
             "text/plain": [
               "<IPython.core.display.Markdown object>"
             ]
           },
-          "execution_count": 12,
+          "execution_count": 11,
           "metadata": {},
           "output_type": "execute_result"
         }
@@ -403,9 +408,15 @@
         "  Entities to extract: URLs.\n",
         "  Text: {url_text}\n",
         "  Do not duplicate entities.\n",
-        "  Return your answer in a markdown format:\"\"\"\n",
+        "  Return your answer in a markdown format:\n",
+        "\"\"\"\n",
+        "\n",
+        "response = client.models.generate_content(\n",
+        "    model=MODEL_ID,\n",
+        "    contents=url_prompt\n",
+        ")\n",
         "\n",
-        "Markdown(model.generate_content(url_prompt).text)"
+        "Markdown(response.text)"
       ]
     }
   ],
diff --git a/examples/README.md b/examples/README.md
index fd4519bee..55709cf1d 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -26,6 +26,8 @@ This is a collection of fun and helpful examples for the Gemini API.
 | [Invoice and Form Data Extraction](./Pdf_structured_outputs_on_invoices_and_forms.ipynb) | Use the Gemini API to extract information from PDFs | File API, Structured Outputs | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Pdf_structured_outputs_on_invoices_and_forms.ipynb) |
 | [Opossum search](./Opossum_search.ipynb) | Code generation with the Gemini API. Just for fun, you'll prompt the model to create a web app called "Opossum Search" that searches Google with "opossum" appended to the query. | Code generation | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Opossum_search.ipynb) |
 | [Virtual Try-on](./Virtual_Try_On.ipynb) | A Virtual Try-On application that uses Gemini 2.0 for 2D object detection to identify outfits in images and Imagen 3 for generating and inpainting new outfits. | Spatial Understanding | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Virtual_Try_On.ipynb) |
+| [Talk to documents](./Talk_to_documents_with_embeddings.ipynb) | Use embeddings to search through a custom database. | Embeddings | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Talk_to_documents_with_embeddings.ipynb) |
+| [Entity extraction](./Entity_Extraction.ipynb) | Use Gemini API to speed up some of your tasks, such as searching through text to extract needed information. Entity extraction with a Gemini model is a simple query, and you can ask it to retrieve its answer in the form that you prefer. | Embeddings | [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Entity_Extraction.ipynb) |
 
 ---
 <br>
diff --git a/examples/Talk_to_documents_with_embeddings.ipynb b/examples/Talk_to_documents_with_embeddings.ipynb
index fe57fa169..913ddc43f 100644
--- a/examples/Talk_to_documents_with_embeddings.ipynb
+++ b/examples/Talk_to_documents_with_embeddings.ipynb
@@ -6,12 +6,12 @@
         "id": "Tce3stUlHN0L"
       },
       "source": [
-        "##### Copyright 2024 Google LLC."
+        "##### Copyright 2025 Google LLC."
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": null,
+      "execution_count": 1,
       "metadata": {
         "cellView": "form",
         "id": "tuOe1ymfHZPu"
@@ -46,7 +46,7 @@
         "id": "kIkJ7zgADMlP"
       },
       "source": [
-        "<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Talk_to_documents_with_embeddings.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/>"
+        "<a target=\"_blank\" href=\"https://colab.research.google.com/github/google-gemini/cookbook/blob/main/examples/Talk_to_documents_with_embeddings.ipynb\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" height=30/></a>"
       ]
     },
     {
@@ -73,33 +73,13 @@
     },
     {
       "cell_type": "code",
-      "execution_count": null,
+      "execution_count": 2,
       "metadata": {
         "id": "YD6urJjWGVDf"
       },
       "outputs": [],
       "source": [
-        "%pip install -U -q \"google-generativeai>=0.7.2\""
-      ]
-    },
-    {
-      "cell_type": "code",
-      "execution_count": null,
-      "metadata": {
-        "id": "Zey3UiYGDDzU"
-      },
-      "outputs": [],
-      "source": [
-        "import textwrap\n",
-        "import numpy as np\n",
-        "import pandas as pd\n",
-        "\n",
-        "import google.generativeai as genai\n",
-        "\n",
-        "# Used to securely store your API key\n",
-        "from google.colab import userdata\n",
-        "\n",
-        "from IPython.display import Markdown"
+        "%pip install -U -q \"google-genai>=1.0.0\""
       ]
     },
     {
@@ -113,14 +93,17 @@
     },
     {
       "cell_type": "code",
-      "execution_count": null,
+      "execution_count": 3,
       "metadata": {
         "id": "JIm3gEGYhTX1"
       },
       "outputs": [],
       "source": [
+        "from google import  genai\n",
+        "from google.colab import userdata\n",
+        "\n",
         "GOOGLE_API_KEY=userdata.get('GOOGLE_API_KEY')\n",
-        "genai.configure(api_key=GOOGLE_API_KEY)"
+        "client = genai.Client(api_key=GOOGLE_API_KEY)"
       ]
     },
     {
@@ -138,7 +121,7 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 2,
+      "execution_count": 4,
       "metadata": {
         "id": "J76TNa3QDwCc"
       },
@@ -147,23 +130,29 @@
           "name": "stdout",
           "output_type": "stream",
           "text": [
-            "{'embedding': [0.03411343, -0.05517662, -0.020209055, -0.0041249567, 0.058917783, 0.014129515, 0.0045353593, 0.0014303668, 0.05976634, 0.08292115, 0.007162964, 0.0069041685, -0.053083427, -0.010905125, 0.0321402, -0.037163995, 0.050372455, 0.019348344, -0.037328612, 0.026647927, 0.030781753, -0.011288501, -0.031485256, -0.060248993, -0.026219442, -0.009794235, 0.006630139, -0.01846516, -0.026324715, 0.020442624, -0.06317684, 0.014559574, -0.052296035, 0.016451128, -9.720217e-05, -0.051706687, -0.0054406044, -0.056967627, 0.011144145, -0.009201792, -0.0021951047, -0.1099701, -0.011712193, 0.021221714, 0.009171804, -0.029621972, 0.034534883, 0.039578073, 0.019021519, -0.06269169, 0.039473332, 0.052403256, 0.061814185, -0.034507945, -0.009557816, -0.0049551064, 0.017839009, -0.021176832, 0.015043588, 0.015390569, -0.006334281, 0.043696404, -0.028341983, 0.028433999, 0.01472686, -0.06585564, -0.044533554, 0.0055523133, 0.035775978, 0.031099156, 0.027357662, 0.028062241, 0.056972917, -0.054656833, -0.027864764, -0.15486294, -0.027930057, 0.043678433, 0.008391214, 0.020209847, 0.002841071, -0.07201404, -0.05025868, -0.034896467, -0.030400582, 0.016623711, -0.050455835, -0.025557702, 0.0050540236, 0.032266915, -0.018223321, -0.04913693, 0.07667526, -0.03066128, -0.0127946865, 0.107169494, -0.0563475, -0.016773727, -0.010336115, -0.05220995, -0.022049127, 0.00478732, -0.039094422, 0.015671168, 0.041542538, 0.016112784, -0.022650082, 0.002988097, -0.061147556, 0.06630078, -0.057244215, -0.013767544, -0.003466806, -0.053994596, 0.04230463, -0.029314812, 0.021347178, 0.04522084, 0.0072983643, 0.0247336, 0.020755325, 0.025620919, 0.021721177, 0.008178421, -0.063603185, 0.025854606, -0.037521806, 0.020877894, 0.033131972, 0.030288944, 0.0033810628, -0.048698667, -0.027295412, 0.05622969, 0.029634966, 0.029705161, 0.010602056, -0.02217137, 0.03195607, 0.047208548, -0.013620148, 0.038463745, 0.0052672145, -0.024868716, -0.0071725682, 0.069668904, -0.092124775, 0.014151632, 0.0057337824, -0.006012909, -0.035946254, 0.0334855, -0.07426327, 0.033595767, 0.033740804, 0.0394573, -0.048899952, 0.06265119, 0.0028897377, 0.0039847936, 0.0329678, -0.012809373, 0.050108086, 0.009314281, -0.019499086, -0.048860364, -0.015204039, 0.008016007, 0.015667893, 0.03903864, 0.011732032, 0.034669068, -0.01226258, -0.052623957, 0.006695629, -0.05849198, 0.00101155, -0.009621011, -0.0052014636, -0.020959012, -0.02466722, -0.03861565, 0.049754824, 0.048655674, 0.0044479654, -0.020404046, 0.101043485, -0.022594253, -0.06822699, 0.044780556, -0.03859346, -0.015194885, -0.0059435116, -0.016267126, 0.0012126336, 0.054198146, 0.01978253, 0.02905382, 0.034172967, -0.0032252679, 0.020003818, 0.07212547, 0.035888623, -0.00029856138, 0.0044168616, 0.036989234, 0.100975856, 0.0048228516, -0.04405796, 0.00039434276, -0.044601627, -0.011658614, 0.03398768, 0.02250937, 0.034583274, -0.03440395, -0.003274625, -0.005927225, -0.007679341, -0.025777208, -0.02205426, 0.00823437, -0.027172998, -0.015607741, -0.022958823, 0.098416075, -0.045472592, 0.031623535, 0.030663209, -0.03987397, 0.0048750523, 0.057770126, 0.04547866, 0.009881574, 0.044948515, 0.012011639, 0.003141497, 0.0016209317, 0.07142094, 0.025111957, -0.049478546, 0.052195616, 0.041401174, 0.0380032, -0.05878786, -0.007194873, -0.015402912, 0.048243146, 0.025205499, 0.051020827, -0.030305905, -0.031656887, -0.008994425, 0.039839912, -0.043015696, 0.008373317, -0.089018084, -0.045301914, -0.0074205245, 0.0049243467, 0.060365975, -0.06462967, 0.00815101, -0.020417998, 0.00030822973, -0.039288856, 0.04017253, 0.03137731, -0.031728875, 0.03444872, -0.031234143, -0.048502136, 0.033941768, 0.034225147, -0.008299359, 0.033098515, -0.012317135, 0.014448822, 0.06187389, -0.059683096, 0.0012899865, 0.007460227, 0.02652167, -0.07248658, -0.05818953, 0.030052334, -0.015347992, -0.035913672, -0.034901086, -0.0661791, -0.055562418, 0.0130468095, -0.0035763406, -0.0086615095, -0.046888705, -0.005326655, -0.021710252, 0.072175056, 0.038597208, -0.038364347, -0.005039459, -0.07634857, -0.045539834, -0.07372115, 0.018378831, -0.032071035, -0.030269828, -0.044599615, 0.05132602, 0.04769642, 0.0014855171, -0.028435005, -0.0016777773, 0.0072506564, 0.08448479, 0.04224268, -0.029304115, 0.02165559, 0.0056837583, 0.06214723, 0.0028552667, 0.015904495, -0.016737062, -0.0040876116, -0.037475582, 0.04675168, -0.052556172, -0.016293239, -0.014435561, 0.022127734, -0.0052535324, 0.0190588, -0.011537659, 0.0484614, 0.028816467, 0.024607794, -0.043762755, 0.011608192, 0.0021703655, -0.045297306, -0.0048169023, -0.0071430723, 0.011705694, -0.05006429, 0.029933244, -0.020802287, -0.07580785, -0.012268235, 0.07616304, 0.006857885, 0.01853518, 0.043729052, -0.032221675, -0.010121849, -0.019831154, -0.032731093, 0.051531196, 0.0024111927, 0.090960525, -0.036896333, 0.035708647, 0.03678696, 0.00832481, 0.001757778, 0.04144341, 0.042203393, 0.0045936033, 0.021837635, 0.0066275136, 0.0069022025, -0.008452904, -0.03277543, 0.0061044246, -0.02500629, 0.012441071, 0.018081166, -0.06230864, -0.040046707, -0.019351328, 0.0007255696, 0.002202931, -0.041990966, 0.023313772, 0.039377946, -0.0012839311, 0.010378518, 0.0025737497, 0.043841247, -0.0067742136, 0.045794934, 0.01388272, 0.032243907, 0.0919292, 0.03760722, 0.0060486114, 0.010843367, 0.001991803, -0.04838942, -0.006412631, -0.030764624, -0.015602797, -0.048885867, -0.015245706, -0.0006477355, 0.013608845, 0.0040335134, -0.0015530499, -0.008402027, -0.05728556, -0.027370622, 0.019342335, -0.039145477, 0.049000833, -0.052876346, -0.060248777, 0.009484413, 0.011271402, -0.0019944878, -0.013369263, -0.0130786, 0.0050903647, -0.0003995775, 0.04580157, -0.030488051, -0.07777237, 0.022998745, -0.007693635, -0.013473893, 0.0071830116, 0.014312745, 0.019949466, 0.034036275, -0.0011623668, 0.022655929, -0.0049825236, -0.036455333, 0.0033899196, 0.020583669, -0.010457001, 0.027299065, 0.034606297, -0.0111719165, -0.013660416, -0.02705466, -0.05144293, -0.07396907, -0.022817062, -0.0064836126, 0.037774086, -0.06774259, 0.016620712, -0.046481006, -0.030288063, -0.055035893, -0.015402408, -0.014477583, 0.0024700973, 0.024081903, -0.008900536, -0.0032105052, 0.026591286, -0.027869076, -0.014552753, -0.026460772, 0.06831125, -0.019622969, -0.028588912, -0.02271201, 0.0019694276, 0.0079966, -0.013207389, -0.07246265, -0.005246626, -0.03556684, 0.014131167, 0.0018361827, -0.084728725, 0.010380415, -0.038140625, 0.0066234693, -0.023485202, 0.05133969, 0.018931301, -0.0077241925, -0.01968148, -0.0615474, 0.036711216, 0.028462604, -0.02205502, 0.02294784, 0.03529192, 0.044653304, -0.029656367, -0.04243813, -0.024271922, 0.008206945, -0.015324323, 0.028326686, 0.0708875, 0.03499979, -0.04111004, -0.02691298, -0.011054021, 0.035632536, 0.057256706, -0.058149684, 0.022313014, -0.03727344, 0.0095027555, -0.0325091, -0.007395906, 0.009455788, 0.0053972304, -0.028935568, 0.054196633, -0.051867362, -0.010642803, 0.034427024, 0.04308132, 0.020671992, 0.068610825, 0.018303277, -0.08433639, 0.0023544622, -0.009237108, -0.0410166, 0.012912618, -0.035220295, 0.032994937, -0.0063333404, -0.028377546, 0.05429965, -0.022590995, -0.033762764, -0.0061482205, 0.0014308131, 0.05402618, -0.030298075, -0.020893354, 0.04020406, -0.013849863, -0.047842298, 0.032006662, 0.037729368, -0.02878951, 0.002758488, -0.0023380243, -0.052403864, 0.021707276, -0.02718091, 0.0045513017, 0.02493268, -0.016037108, 0.009521465, 0.022595555, -0.03332406, -0.01791281, -0.026219219, 0.015336862, 0.018615942, 0.0014700901, 0.005194217, -0.0059983027, -0.002134208, 0.055935774, 0.0002028429, -0.01381741, 0.0005677742, 0.052481145, -0.0056857914, -0.024219796, -0.0074823913, 0.041230515, 0.005571935, 0.06841099, -0.025634678, -0.037456885, -0.0021465495, -0.05163424, 0.048833348, 0.057269894, -0.0017718605, -0.012836743, 0.054180846, -0.032427873, -0.003244846, 0.01254491, 0.0071952185, 0.02080726, 0.015043071, -0.08000574, 0.047099367, -0.009071923, 0.022494175, -0.007407801, -0.018199192, 0.01923855, -0.016820459, 0.026590073, 0.05919531, -0.015211094, -0.051043298, 0.05085604, -0.027980763, -0.01785205, 0.05260401, 0.0039136643, -0.010834236, 0.015846392, 0.011993318, 0.0085244095, -0.09705911, 0.004848937, -0.03151453, -0.049902532, -0.023312563, 0.0169847, 0.051852323, -0.018586924, -0.011750037, 0.020324359, 0.041236103, 0.046270456, 0.045885824, 0.035645086, 0.027820086, -0.054944187, -0.0018159872, 0.06008568, 0.056207847, 0.03509413, 0.07476336, 0.00042090056, -0.01791933, -0.049269866, 0.013118644, 0.03817175, 0.03985353, -0.023338122, -0.05917611, -0.040447813, -0.014515073, -0.01641867, -0.012444603, -0.015801677, 0.01694387, -0.012097041, -0.10444289, -0.044068433, 0.028175205, 0.0032158983, 0.017225135, 0.024197249, 0.0003871886, 0.008296747, 0.0020322825, -0.06488942, -0.028532177, 0.03631236, -0.021784041, -0.028676897, 0.020023972, -0.015093374, -0.0053404626, -0.035407133, -0.03022746, -0.045240995, -0.089037456, -0.05241791, 0.01601896, -0.058039088, 0.06633133, 0.01435994, 0.0024608225, 0.02044063, 0.049869247, 0.013966787, 0.011062478, 0.023516618, 0.010368709, 0.039040443, -0.03096598, -0.01665127, 0.010691767, -0.0089797005, 0.018564576, 0.03291386, 0.0032383145, -0.00884169, -0.008645399, 0.0001677955, -0.04452774, 0.007207213, -0.008696507, 0.0023566217, -0.025329702, -0.042708885, -0.03173582, 0.06427912, 0.030916397, -0.022305708, -0.018711232, -0.008136281, -0.01636213, 0.019092057, 0.010243902, -0.04405114, 0.018331835, -0.025844995, 0.035896596, 0.049257137, -0.053962618, -0.084952496, -0.009314442, -0.03644633, 0.0010881334, -0.042904764, 0.016017154, -0.011390375, 0.056498464, 0.007735383, 0.015750613, 0.023586866, -0.005065194, -0.05339934, 0.030084236, -0.021841932, -0.0035868485, -0.025362536, 0.0315042, 0.039552346, -0.032164883, -0.03519624, -0.013936666, 0.006526046, 0.02818671, -0.018081086, 0.04806136, -0.04418975, -0.064630605, -0.010125073, -0.02926605, 0.022641547, 0.040159058, 0.022463534, -0.04924557, -0.010198766, -0.019940902, -0.0033762371, -0.07010838, -0.031799905, -0.020567331, -0.015259151, 0.04870838, 0.030047685, -0.016861487, 0.020778332, -0.034649372, -0.0026895248, -0.0053685517, -0.03297844, -0.0048753927, -0.005587019, -0.041837722, 0.0161564, 0.072810896, -0.043315165, 0.03330332]}\n"
+            "embeddings=[ContentEmbedding(values=[0.034113422, -0.055176623, -0.020209068, -0.0041249595, 0.058917794, 0.01412951, 0.004535358, 0.0014303708, 0.059766337, 0.08292115, 0.007162965, 0.0069041667, -0.05308343, -0.01090513, 0.03214021, -0.037164, 0.050372463, 0.019348344, -0.037328612, 0.026647933, 0.03078176, -0.011288503, -0.031485256, -0.060248997, -0.026219437, -0.009794238, 0.0066301385, -0.018465156, -0.026324723, 0.020442627, -0.06317685, 0.014559578, -0.052296046, 0.016451124, -9.71961e-05, -0.051706687, -0.0054406007, -0.05696762, 0.01114414, -0.009201795, -0.0021951075, -0.10997012, -0.0117121935, 0.021221716, 0.009171805, -0.029621972, 0.034534886, 0.039578073, 0.019021517, -0.062691696, 0.039473332, 0.052403256, 0.061814193, -0.034507953, -0.009557814, -0.004955104, 0.01783901, -0.021176832, 0.015043591, 0.015390573, -0.0063342857, 0.043696415, -0.028341988, 0.02843402, 0.014726859, -0.06585564, -0.044533547, 0.0055523184, 0.035775978, 0.031099156, 0.027357664, 0.028062243, 0.056972917, -0.05465685, -0.027864771, -0.15486297, -0.02793005, 0.043678444, 0.008391211, 0.020209849, 0.0028410745, -0.07201404, -0.05025868, -0.034896467, -0.030400587, 0.016623715, -0.05045584, -0.0255577, 0.005054033, 0.032266915, -0.018223327, -0.04913693, 0.07667526, -0.030661274, -0.012794688, 0.1071695, -0.056347493, -0.01677373, -0.0103361085, -0.05220995, -0.022049135, 0.0047873175, -0.039094433, 0.01567117, 0.041542534, 0.016112788, -0.022650084, 0.002988097, -0.06114755, 0.06630078, -0.057244215, -0.013767545, -0.0034668013, -0.0539946, 0.04230463, -0.02931482, 0.021347184, 0.045220844, 0.0072983666, 0.024733597, 0.020755325, 0.025620922, 0.021721184, 0.008178418, -0.06360319, 0.025854602, -0.037521813, 0.020877898, 0.03313197, 0.03028894, 0.0033810644, -0.048698656, -0.027295418, 0.056229696, 0.029634967, 0.029705163, 0.010602057, -0.022171361, 0.03195608, 0.047208548, -0.013620149, 0.038463745, 0.0052672126, -0.024868716, -0.007172572, 0.06966891, -0.09212479, 0.014151631, 0.005733778, -0.0060129096, -0.035946265, 0.03348549, -0.07426328, 0.03359577, 0.033740804, 0.039457306, -0.048899952, 0.06265119, 0.0028897398, 0.003984799, 0.0329678, -0.012809363, 0.05010809, 0.0093142865, -0.019499099, -0.048860367, -0.015204042, 0.008016001, 0.01566789, 0.039038636, 0.011732032, 0.03466906, -0.012262578, -0.052623957, 0.0066956305, -0.05849198, 0.0010115543, -0.0096210195, -0.005201466, -0.020959012, -0.02466722, -0.03861566, 0.04975482, 0.04865567, 0.004447966, -0.020404048, 0.10104349, -0.022594253, -0.06822701, 0.04478056, -0.03859347, -0.015194895, -0.005943515, -0.016267126, 0.0012126288, 0.05419815, 0.019782525, 0.029053815, 0.03417297, -0.003225268, 0.020003827, 0.07212549, 0.03588863, -0.0002985594, 0.004416864, 0.03698924, 0.10097586, 0.0048228535, -0.044057958, 0.00039435015, -0.04460163, -0.011658617, 0.033987682, 0.02250937, 0.034583278, -0.03440395, -0.0032746233, -0.0059272256, -0.007679346, -0.02577721, -0.022054257, 0.008234382, -0.027173005, -0.015607741, -0.022958817, 0.09841609, -0.0454726, 0.03162353, 0.030663213, -0.03987397, 0.0048750504, 0.05777013, 0.04547866, 0.00988157, 0.04494851, 0.012011644, 0.0031414998, 0.001620927, 0.07142094, 0.025111964, -0.049478553, 0.052195616, 0.04140117, 0.038003206, -0.058787853, -0.0071948697, -0.015402911, 0.048243158, 0.025205497, 0.051020835, -0.030305903, -0.03165689, -0.008994429, 0.039839923, -0.0430157, 0.008373322, -0.08901809, -0.045301918, -0.007420523, 0.0049243458, 0.060365982, -0.06462967, 0.008151015, -0.020417988, 0.00030823264, -0.03928886, 0.040172532, 0.031377304, -0.031728886, 0.034448728, -0.031234154, -0.048502147, 0.033941768, 0.03422515, -0.008299363, 0.033098523, -0.012317136, 0.014448827, 0.061873898, -0.059683096, 0.0012899803, 0.00746023, 0.026521664, -0.0724866, -0.058189534, 0.03005233, -0.015348002, -0.035913676, -0.034901086, -0.066179104, -0.05556242, 0.013046814, -0.0035763385, -0.008661504, -0.04688871, -0.0053266473, -0.02171025, 0.07217506, 0.03859721, -0.038364355, -0.0050394586, -0.07634857, -0.045539834, -0.07372116, 0.018378839, -0.03207104, -0.030269839, -0.044599626, 0.05132603, 0.047696415, 0.0014855172, -0.028435, -0.0016777765, 0.0072506634, 0.0844848, 0.042242683, -0.02930412, 0.02165559, 0.005683754, 0.062147245, 0.0028552744, 0.01590449, -0.016737064, -0.004087606, -0.037475586, 0.046751697, -0.05255618, -0.016293237, -0.014435562, 0.022127738, -0.005253533, 0.0190588, -0.01153766, 0.048461404, 0.028816463, 0.024607794, -0.04376276, 0.011608203, 0.0021703632, -0.045297313, -0.004816908, -0.0071430732, 0.011705692, -0.050064296, 0.029933248, -0.02080229, -0.07580785, -0.012268238, 0.07616305, 0.006857887, 0.018535187, 0.043729056, -0.032221675, -0.010121856, -0.019831156, -0.032731097, 0.0515312, 0.0024111872, 0.09096053, -0.03689633, 0.035708643, 0.036786962, 0.008324806, 0.001757773, 0.04144341, 0.042203397, 0.004593604, 0.021837639, 0.006627508, 0.0069022, -0.008452898, -0.032775443, 0.0061044367, -0.025006296, 0.012441073, 0.018081166, -0.062308643, -0.040046703, -0.019351328, 0.00072557223, 0.0022029332, -0.04199097, 0.023313774, 0.039377943, -0.0012839355, 0.0103785265, 0.002573743, 0.04384125, -0.0067742104, 0.045794934, 0.013882725, 0.032243915, 0.091929205, 0.037607223, 0.0060486146, 0.010843365, 0.001991803, -0.04838942, -0.0064126365, -0.030764619, -0.015602799, -0.04888587, -0.015245706, -0.00064773846, 0.01360885, 0.004033513, -0.0015530487, -0.008402032, -0.057285562, -0.027370622, 0.019342335, -0.03914548, 0.04900084, -0.052876357, -0.06024878, 0.009484414, 0.011271402, -0.001994486, -0.013369264, -0.0130786, 0.005090373, -0.0003995788, 0.045801576, -0.030488059, -0.07777238, 0.022998763, -0.007693638, -0.013473888, 0.007183012, 0.014312753, 0.01994947, 0.03403628, -0.0011623681, 0.022655934, -0.0049825236, -0.036455337, 0.0033899224, 0.020583674, -0.010457001, 0.027299067, 0.03460629, -0.011171918, -0.013660423, -0.027054664, -0.051442944, -0.07396909, -0.022817064, -0.0064836214, 0.03777409, -0.0677426, 0.016620716, -0.046481006, -0.030288065, -0.055035904, -0.015402414, -0.014477586, 0.0024700982, 0.024081908, -0.008900538, -0.0032105157, 0.026591286, -0.027869072, -0.01455275, -0.026460776, 0.068311274, -0.01962297, -0.028588908, -0.022712013, 0.0019694234, 0.007996597, -0.01320739, -0.07246265, -0.005246631, -0.035566848, 0.014131174, 0.0018361876, -0.08472873, 0.010380412, -0.038140625, 0.0066234684, -0.023485197, 0.051339693, 0.018931303, -0.0077242004, -0.019681484, -0.061547395, 0.036711216, 0.028462604, -0.022055028, 0.022947844, 0.03529193, 0.044653304, -0.029656371, -0.04243814, -0.02427193, 0.008206938, -0.015324316, 0.028326683, 0.070887506, 0.0349998, -0.04111004, -0.026912982, -0.011054018, 0.035632547, 0.057256706, -0.058149688, 0.02231301, -0.037273444, 0.00950276, -0.032509107, -0.007395907, 0.009455789, 0.005397236, -0.028935576, 0.054196645, -0.05186736, -0.010642795, 0.034427032, 0.04308133, 0.020671993, 0.06861083, 0.01830328, -0.08433641, 0.0023544622, -0.009237106, -0.041016597, 0.01291262, -0.0352203, 0.03299494, -0.006333336, -0.028377548, 0.054299653, -0.022590997, -0.03376276, -0.0061482224, 0.0014308209, 0.054026186, -0.030298073, -0.020893361, 0.04020406, -0.013849857, -0.0478423, 0.032006662, 0.037729375, -0.028789517, 0.0027584916, -0.0023380248, -0.05240387, 0.02170729, -0.027180914, 0.004551297, 0.02493268, -0.016037105, 0.009521465, 0.022595555, -0.033324063, -0.017912813, -0.026219225, 0.015336868, 0.018615946, 0.0014700937, 0.005194219, -0.005998306, -0.0021342067, 0.05593579, 0.00020284035, -0.013817418, 0.0005677768, 0.05248115, -0.0056857974, -0.024219804, -0.007482394, 0.04123051, 0.0055719293, 0.068411, -0.02563468, -0.03745689, -0.0021465535, -0.05163426, 0.048833355, 0.057269897, -0.0017718537, -0.012836741, 0.054180846, -0.03242787, -0.0032448475, 0.012544908, 0.0071952143, 0.020807253, 0.015043074, -0.08000575, 0.04709938, -0.009071926, 0.022494176, -0.007407807, -0.018199189, 0.019238548, -0.016820466, 0.026590088, 0.05919531, -0.015211089, -0.0510433, 0.050856046, -0.027980778, -0.017852055, 0.05260401, 0.0039136647, -0.010834248, 0.01584639, 0.011993318, 0.00852441, -0.097059116, 0.0048489347, -0.031514537, -0.049902532, -0.023312565, 0.0169847, 0.051852323, -0.01858693, -0.011750041, 0.020324364, 0.041236117, 0.04627045, 0.045885827, 0.035645086, 0.027820094, -0.05494418, -0.0018159925, 0.06008569, 0.056207854, 0.03509414, 0.074763365, 0.0004208977, -0.017919326, -0.049269877, 0.013118645, 0.038171757, 0.039853524, -0.023338124, -0.059176117, -0.040447816, -0.0145150805, -0.016418666, -0.012444612, -0.01580168, 0.01694388, -0.012097042, -0.104442894, -0.044068433, 0.028175201, 0.0032159043, 0.017225137, 0.02419725, 0.0003871912, 0.008296755, 0.0020322877, -0.06488944, -0.02853217, 0.036312364, -0.021784041, -0.028676901, 0.020023974, -0.015093378, -0.0053404663, -0.03540713, -0.03022747, -0.045241, -0.08903746, -0.052417908, 0.016018962, -0.05803908, 0.066331334, 0.014359937, 0.0024608157, 0.02044064, 0.049869247, 0.0139667895, 0.01106248, 0.023516618, 0.010368704, 0.039040446, -0.030965973, -0.016651275, 0.010691768, -0.008979694, 0.018564584, 0.032913856, 0.0032383192, -0.008841689, -0.008645397, 0.00016779326, -0.04452774, 0.007207218, -0.0086965095, 0.002356624, -0.0253297, -0.042708885, -0.03173582, 0.064279124, 0.030916398, -0.022305708, -0.01871124, -0.008136282, -0.01636213, 0.019092064, 0.010243903, -0.044051144, 0.018331837, -0.025844995, 0.035896596, 0.04925714, -0.053962626, -0.0849525, -0.009314449, -0.036446325, 0.0010881483, -0.04290476, 0.016017154, -0.011390376, 0.05649847, 0.0077353898, 0.015750611, 0.023586864, -0.0050651943, -0.053399336, 0.03008423, -0.021841934, -0.003586853, -0.025362542, 0.0315042, 0.039552346, -0.032164883, -0.03519625, -0.013936669, 0.006526044, 0.028186707, -0.018081088, 0.048061363, -0.04418975, -0.06463061, -0.010125075, -0.02926605, 0.022641543, 0.04015906, 0.022463536, -0.049245585, -0.010198768, -0.019940907, -0.003376235, -0.070108384, -0.03179991, -0.020567335, -0.015259155, 0.04870839, 0.030047687, -0.016861485, 0.020778328, -0.03464937, -0.0026895283, -0.005368552, -0.032978434, -0.004875402, -0.0055870223, -0.041837726, 0.016156392, 0.07281091, -0.043315165, 0.03330332], statistics=None)] metadata=None\n"
           ]
         }
       ],
       "source": [
+        "from google.genai import types\n",
+        "\n",
         "title = \"The next generation of AI for developers and Google Workspace\"\n",
-        "sample_text = (\"Title: The next generation of AI for developers and Google Workspace\"\n",
-        "    \"\\n\"\n",
-        "    \"Full article:\\n\"\n",
-        "    \"\\n\"\n",
-        "    \"Gemini API & Google AI Studio: An approachable way to explore and prototype with generative AI applications\")\n",
+        "sample_text = \"\"\"\n",
+        "    Title: The next generation of AI for developers and Google Workspace\n",
+        "    Full article:\n",
+        "    Gemini API & Google AI Studio: An approachable way to explore and\n",
+        "    prototype with generative AI applications\n",
+        "\"\"\"\n",
         "\n",
-        "model = 'models/embedding-001'\n",
-        "embedding = genai.embed_content(model=model,\n",
-        "                                content=sample_text,\n",
-        "                                task_type=\"retrieval_document\",\n",
-        "                                title=title)\n",
+        "EMBEDDING_MODEL_ID = \"models/embedding-001\"  # @param [\"models/embedding-gecko-001\", \"models/embedding-001\", \"models/text-embedding-004\", \"models/gemini-embedding-exp-03-07\", \"models/gemini-embedding-exp\"] {\"allow-input\": true, \"isTemplate\": true}\n",
+        "embedding = client.models.embed_content(\n",
+        "        model=EMBEDDING_MODEL_ID,\n",
+        "        contents=sample_text,\n",
+        "        config=types.EmbedContentConfig(\n",
+        "            task_type=\"retrieval_document\",\n",
+        "            title=title\n",
+        "    ))\n",
         "\n",
         "print(embedding)"
       ]
@@ -181,7 +170,7 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 3,
+      "execution_count": 5,
       "metadata": {
         "id": "XvLRIbpq4vNN"
       },
@@ -211,15 +200,22 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 4,
+      "execution_count": 6,
       "metadata": {
         "id": "GJKLIW9Z31Vf"
       },
       "outputs": [
         {
           "data": {
+            "application/vnd.google.colaboratory.intrinsic+json": {
+              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 3,\n  \"fields\": [\n    {\n      \"column\": \"Title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"Operating the Climate Control System\",\n          \"Touchscreen\",\n          \"Shifting Gears\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"Your Googlecar has a climate control system that allows you to adjust the temperature and airflow in the car. To operate the climate control system, use the buttons and knobs located on the center console.  Temperature: The temperature knob controls the temperature inside the car. Turn the knob clockwise to increase the temperature or counterclockwise to decrease the temperature. Airflow: The airflow knob controls the amount of airflow inside the car. Turn the knob clockwise to increase the airflow or counterclockwise to decrease the airflow. Fan speed: The fan speed knob controls the speed of the fan. Turn the knob clockwise to increase the fan speed or counterclockwise to decrease the fan speed. Mode: The mode button allows you to select the desired mode. The available modes are: Auto: The car will automatically adjust the temperature and airflow to maintain a comfortable level. Cool: The car will blow cool air into the car. Heat: The car will blow warm air into the car. Defrost: The car will blow warm air onto the windshield to defrost it.\",\n          \"Your Googlecar has a large touchscreen display that provides access to a variety of features, including navigation, entertainment, and climate control. To use the touchscreen display, simply touch the desired icon.  For example, you can touch the \\\"Navigation\\\" icon to get directions to your destination or touch the \\\"Music\\\" icon to play your favorite songs.\",\n          \"Your Googlecar has an automatic transmission. To shift gears, simply move the shift lever to the desired position.  Park: This position is used when you are parked. The wheels are locked and the car cannot move. Reverse: This position is used to back up. Neutral: This position is used when you are stopped at a light or in traffic. The car is not in gear and will not move unless you press the gas pedal. Drive: This position is used to drive forward. Low: This position is used for driving in snow or other slippery conditions.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}",
+              "type": "dataframe",
+              "variable_name": "df"
+            },
             "text/html": [
-              "<div>\n",
+              "\n",
+              "  <div id=\"df-8043255b-95df-4c8b-9120-b2213fe362b4\" class=\"colab-df-container\">\n",
+              "    <div>\n",
               "<style scoped>\n",
               "    .dataframe tbody tr th:only-of-type {\n",
               "        vertical-align: middle;\n",
@@ -259,7 +255,271 @@
               "    </tr>\n",
               "  </tbody>\n",
               "</table>\n",
-              "</div>"
+              "</div>\n",
+              "    <div class=\"colab-df-buttons\">\n",
+              "\n",
+              "  <div class=\"colab-df-container\">\n",
+              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-8043255b-95df-4c8b-9120-b2213fe362b4')\"\n",
+              "            title=\"Convert this dataframe to an interactive table.\"\n",
+              "            style=\"display:none;\">\n",
+              "\n",
+              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
+              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
+              "  </svg>\n",
+              "    </button>\n",
+              "\n",
+              "  <style>\n",
+              "    .colab-df-container {\n",
+              "      display:flex;\n",
+              "      gap: 12px;\n",
+              "    }\n",
+              "\n",
+              "    .colab-df-convert {\n",
+              "      background-color: #E8F0FE;\n",
+              "      border: none;\n",
+              "      border-radius: 50%;\n",
+              "      cursor: pointer;\n",
+              "      display: none;\n",
+              "      fill: #1967D2;\n",
+              "      height: 32px;\n",
+              "      padding: 0 0 0 0;\n",
+              "      width: 32px;\n",
+              "    }\n",
+              "\n",
+              "    .colab-df-convert:hover {\n",
+              "      background-color: #E2EBFA;\n",
+              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
+              "      fill: #174EA6;\n",
+              "    }\n",
+              "\n",
+              "    .colab-df-buttons div {\n",
+              "      margin-bottom: 4px;\n",
+              "    }\n",
+              "\n",
+              "    [theme=dark] .colab-df-convert {\n",
+              "      background-color: #3B4455;\n",
+              "      fill: #D2E3FC;\n",
+              "    }\n",
+              "\n",
+              "    [theme=dark] .colab-df-convert:hover {\n",
+              "      background-color: #434B5C;\n",
+              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
+              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
+              "      fill: #FFFFFF;\n",
+              "    }\n",
+              "  </style>\n",
+              "\n",
+              "    <script>\n",
+              "      const buttonEl =\n",
+              "        document.querySelector('#df-8043255b-95df-4c8b-9120-b2213fe362b4 button.colab-df-convert');\n",
+              "      buttonEl.style.display =\n",
+              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
+              "\n",
+              "      async function convertToInteractive(key) {\n",
+              "        const element = document.querySelector('#df-8043255b-95df-4c8b-9120-b2213fe362b4');\n",
+              "        const dataTable =\n",
+              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
+              "                                                    [key], {});\n",
+              "        if (!dataTable) return;\n",
+              "\n",
+              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
+              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
+              "          + ' to learn more about interactive tables.';\n",
+              "        element.innerHTML = '';\n",
+              "        dataTable['output_type'] = 'display_data';\n",
+              "        await google.colab.output.renderOutput(dataTable, element);\n",
+              "        const docLink = document.createElement('div');\n",
+              "        docLink.innerHTML = docLinkHtml;\n",
+              "        element.appendChild(docLink);\n",
+              "      }\n",
+              "    </script>\n",
+              "  </div>\n",
+              "\n",
+              "\n",
+              "<div id=\"df-79d1c41e-51f6-44ad-8c7c-0e5095392029\">\n",
+              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-79d1c41e-51f6-44ad-8c7c-0e5095392029')\"\n",
+              "            title=\"Suggest charts\"\n",
+              "            style=\"display:none;\">\n",
+              "\n",
+              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
+              "     width=\"24px\">\n",
+              "    <g>\n",
+              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
+              "    </g>\n",
+              "</svg>\n",
+              "  </button>\n",
+              "\n",
+              "<style>\n",
+              "  .colab-df-quickchart {\n",
+              "      --bg-color: #E8F0FE;\n",
+              "      --fill-color: #1967D2;\n",
+              "      --hover-bg-color: #E2EBFA;\n",
+              "      --hover-fill-color: #174EA6;\n",
+              "      --disabled-fill-color: #AAA;\n",
+              "      --disabled-bg-color: #DDD;\n",
+              "  }\n",
+              "\n",
+              "  [theme=dark] .colab-df-quickchart {\n",
+              "      --bg-color: #3B4455;\n",
+              "      --fill-color: #D2E3FC;\n",
+              "      --hover-bg-color: #434B5C;\n",
+              "      --hover-fill-color: #FFFFFF;\n",
+              "      --disabled-bg-color: #3B4455;\n",
+              "      --disabled-fill-color: #666;\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-quickchart {\n",
+              "    background-color: var(--bg-color);\n",
+              "    border: none;\n",
+              "    border-radius: 50%;\n",
+              "    cursor: pointer;\n",
+              "    display: none;\n",
+              "    fill: var(--fill-color);\n",
+              "    height: 32px;\n",
+              "    padding: 0;\n",
+              "    width: 32px;\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-quickchart:hover {\n",
+              "    background-color: var(--hover-bg-color);\n",
+              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
+              "    fill: var(--button-hover-fill-color);\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-quickchart-complete:disabled,\n",
+              "  .colab-df-quickchart-complete:disabled:hover {\n",
+              "    background-color: var(--disabled-bg-color);\n",
+              "    fill: var(--disabled-fill-color);\n",
+              "    box-shadow: none;\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-spinner {\n",
+              "    border: 2px solid var(--fill-color);\n",
+              "    border-color: transparent;\n",
+              "    border-bottom-color: var(--fill-color);\n",
+              "    animation:\n",
+              "      spin 1s steps(1) infinite;\n",
+              "  }\n",
+              "\n",
+              "  @keyframes spin {\n",
+              "    0% {\n",
+              "      border-color: transparent;\n",
+              "      border-bottom-color: var(--fill-color);\n",
+              "      border-left-color: var(--fill-color);\n",
+              "    }\n",
+              "    20% {\n",
+              "      border-color: transparent;\n",
+              "      border-left-color: var(--fill-color);\n",
+              "      border-top-color: var(--fill-color);\n",
+              "    }\n",
+              "    30% {\n",
+              "      border-color: transparent;\n",
+              "      border-left-color: var(--fill-color);\n",
+              "      border-top-color: var(--fill-color);\n",
+              "      border-right-color: var(--fill-color);\n",
+              "    }\n",
+              "    40% {\n",
+              "      border-color: transparent;\n",
+              "      border-right-color: var(--fill-color);\n",
+              "      border-top-color: var(--fill-color);\n",
+              "    }\n",
+              "    60% {\n",
+              "      border-color: transparent;\n",
+              "      border-right-color: var(--fill-color);\n",
+              "    }\n",
+              "    80% {\n",
+              "      border-color: transparent;\n",
+              "      border-right-color: var(--fill-color);\n",
+              "      border-bottom-color: var(--fill-color);\n",
+              "    }\n",
+              "    90% {\n",
+              "      border-color: transparent;\n",
+              "      border-bottom-color: var(--fill-color);\n",
+              "    }\n",
+              "  }\n",
+              "</style>\n",
+              "\n",
+              "  <script>\n",
+              "    async function quickchart(key) {\n",
+              "      const quickchartButtonEl =\n",
+              "        document.querySelector('#' + key + ' button');\n",
+              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
+              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
+              "      try {\n",
+              "        const charts = await google.colab.kernel.invokeFunction(\n",
+              "            'suggestCharts', [key], {});\n",
+              "      } catch (error) {\n",
+              "        console.error('Error during call to suggestCharts:', error);\n",
+              "      }\n",
+              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
+              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
+              "    }\n",
+              "    (() => {\n",
+              "      let quickchartButtonEl =\n",
+              "        document.querySelector('#df-79d1c41e-51f6-44ad-8c7c-0e5095392029 button');\n",
+              "      quickchartButtonEl.style.display =\n",
+              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
+              "    })();\n",
+              "  </script>\n",
+              "</div>\n",
+              "\n",
+              "  <div id=\"id_c750a8dc-305f-407e-bd69-00503e017b64\">\n",
+              "    <style>\n",
+              "      .colab-df-generate {\n",
+              "        background-color: #E8F0FE;\n",
+              "        border: none;\n",
+              "        border-radius: 50%;\n",
+              "        cursor: pointer;\n",
+              "        display: none;\n",
+              "        fill: #1967D2;\n",
+              "        height: 32px;\n",
+              "        padding: 0 0 0 0;\n",
+              "        width: 32px;\n",
+              "      }\n",
+              "\n",
+              "      .colab-df-generate:hover {\n",
+              "        background-color: #E2EBFA;\n",
+              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
+              "        fill: #174EA6;\n",
+              "      }\n",
+              "\n",
+              "      [theme=dark] .colab-df-generate {\n",
+              "        background-color: #3B4455;\n",
+              "        fill: #D2E3FC;\n",
+              "      }\n",
+              "\n",
+              "      [theme=dark] .colab-df-generate:hover {\n",
+              "        background-color: #434B5C;\n",
+              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
+              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
+              "        fill: #FFFFFF;\n",
+              "      }\n",
+              "    </style>\n",
+              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n",
+              "            title=\"Generate code using this dataframe.\"\n",
+              "            style=\"display:none;\">\n",
+              "\n",
+              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
+              "       width=\"24px\">\n",
+              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
+              "  </svg>\n",
+              "    </button>\n",
+              "    <script>\n",
+              "      (() => {\n",
+              "      const buttonEl =\n",
+              "        document.querySelector('#id_c750a8dc-305f-407e-bd69-00503e017b64 button.colab-df-generate');\n",
+              "      buttonEl.style.display =\n",
+              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
+              "\n",
+              "      buttonEl.onclick = () => {\n",
+              "        google.colab.notebook.generateWithVariable('df');\n",
+              "      }\n",
+              "      })();\n",
+              "    </script>\n",
+              "  </div>\n",
+              "\n",
+              "    </div>\n",
+              "  </div>\n"
             ],
             "text/plain": [
               "                                  Title  \\\n",
@@ -273,12 +533,14 @@
               "2  Your Googlecar has an automatic transmission. ...  "
             ]
           },
-          "execution_count": 4,
+          "execution_count": 6,
           "metadata": {},
           "output_type": "execute_result"
         }
       ],
       "source": [
+        "import pandas as pd\n",
+        "\n",
         "df = pd.DataFrame(documents)\n",
         "df.columns = ['Title', 'Text']\n",
         "df"
@@ -295,15 +557,22 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 5,
+      "execution_count": 7,
       "metadata": {
         "id": "4SOhy0lNBhfN"
       },
       "outputs": [
         {
           "data": {
+            "application/vnd.google.colaboratory.intrinsic+json": {
+              "summary": "{\n  \"name\": \"df\",\n  \"rows\": 3,\n  \"fields\": [\n    {\n      \"column\": \"Title\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"Operating the Climate Control System\",\n          \"Touchscreen\",\n          \"Shifting Gears\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Text\",\n      \"properties\": {\n        \"dtype\": \"string\",\n        \"num_unique_values\": 3,\n        \"samples\": [\n          \"Your Googlecar has a climate control system that allows you to adjust the temperature and airflow in the car. To operate the climate control system, use the buttons and knobs located on the center console.  Temperature: The temperature knob controls the temperature inside the car. Turn the knob clockwise to increase the temperature or counterclockwise to decrease the temperature. Airflow: The airflow knob controls the amount of airflow inside the car. Turn the knob clockwise to increase the airflow or counterclockwise to decrease the airflow. Fan speed: The fan speed knob controls the speed of the fan. Turn the knob clockwise to increase the fan speed or counterclockwise to decrease the fan speed. Mode: The mode button allows you to select the desired mode. The available modes are: Auto: The car will automatically adjust the temperature and airflow to maintain a comfortable level. Cool: The car will blow cool air into the car. Heat: The car will blow warm air into the car. Defrost: The car will blow warm air onto the windshield to defrost it.\",\n          \"Your Googlecar has a large touchscreen display that provides access to a variety of features, including navigation, entertainment, and climate control. To use the touchscreen display, simply touch the desired icon.  For example, you can touch the \\\"Navigation\\\" icon to get directions to your destination or touch the \\\"Music\\\" icon to play your favorite songs.\",\n          \"Your Googlecar has an automatic transmission. To shift gears, simply move the shift lever to the desired position.  Park: This position is used when you are parked. The wheels are locked and the car cannot move. Reverse: This position is used to back up. Neutral: This position is used when you are stopped at a light or in traffic. The car is not in gear and will not move unless you press the gas pedal. Drive: This position is used to drive forward. Low: This position is used for driving in snow or other slippery conditions.\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"Embeddings\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}",
+              "type": "dataframe",
+              "variable_name": "df"
+            },
             "text/html": [
-              "<div>\n",
+              "\n",
+              "  <div id=\"df-6bc92cd3-5978-49fc-8ba4-fd6c0ba9e4ed\" class=\"colab-df-container\">\n",
+              "    <div>\n",
               "<style scoped>\n",
               "    .dataframe tbody tr th:only-of-type {\n",
               "        vertical-align: middle;\n",
@@ -331,23 +600,287 @@
               "      <th>0</th>\n",
               "      <td>Operating the Climate Control System</td>\n",
               "      <td>Your Googlecar has a climate control system th...</td>\n",
-              "      <td>[-0.033361107, -0.021217084, -0.049581926, -0....</td>\n",
+              "      <td>[-0.03336111, -0.021217091, -0.04958193, -0.01...</td>\n",
               "    </tr>\n",
               "    <tr>\n",
               "      <th>1</th>\n",
               "      <td>Touchscreen</td>\n",
               "      <td>Your Googlecar has a large touchscreen display...</td>\n",
-              "      <td>[0.009660736, -0.030662702, -0.017281422, -0.0...</td>\n",
+              "      <td>[0.009660737, -0.030662702, -0.01728142, -0.05...</td>\n",
               "    </tr>\n",
               "    <tr>\n",
               "      <th>2</th>\n",
               "      <td>Shifting Gears</td>\n",
               "      <td>Your Googlecar has an automatic transmission. ...</td>\n",
-              "      <td>[-0.04270796, -0.007160868, -0.03242516, -0.02...</td>\n",
+              "      <td>[-0.042707954, -0.007160867, -0.03242516, -0.0...</td>\n",
               "    </tr>\n",
               "  </tbody>\n",
               "</table>\n",
-              "</div>"
+              "</div>\n",
+              "    <div class=\"colab-df-buttons\">\n",
+              "\n",
+              "  <div class=\"colab-df-container\">\n",
+              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-6bc92cd3-5978-49fc-8ba4-fd6c0ba9e4ed')\"\n",
+              "            title=\"Convert this dataframe to an interactive table.\"\n",
+              "            style=\"display:none;\">\n",
+              "\n",
+              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
+              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
+              "  </svg>\n",
+              "    </button>\n",
+              "\n",
+              "  <style>\n",
+              "    .colab-df-container {\n",
+              "      display:flex;\n",
+              "      gap: 12px;\n",
+              "    }\n",
+              "\n",
+              "    .colab-df-convert {\n",
+              "      background-color: #E8F0FE;\n",
+              "      border: none;\n",
+              "      border-radius: 50%;\n",
+              "      cursor: pointer;\n",
+              "      display: none;\n",
+              "      fill: #1967D2;\n",
+              "      height: 32px;\n",
+              "      padding: 0 0 0 0;\n",
+              "      width: 32px;\n",
+              "    }\n",
+              "\n",
+              "    .colab-df-convert:hover {\n",
+              "      background-color: #E2EBFA;\n",
+              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
+              "      fill: #174EA6;\n",
+              "    }\n",
+              "\n",
+              "    .colab-df-buttons div {\n",
+              "      margin-bottom: 4px;\n",
+              "    }\n",
+              "\n",
+              "    [theme=dark] .colab-df-convert {\n",
+              "      background-color: #3B4455;\n",
+              "      fill: #D2E3FC;\n",
+              "    }\n",
+              "\n",
+              "    [theme=dark] .colab-df-convert:hover {\n",
+              "      background-color: #434B5C;\n",
+              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
+              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
+              "      fill: #FFFFFF;\n",
+              "    }\n",
+              "  </style>\n",
+              "\n",
+              "    <script>\n",
+              "      const buttonEl =\n",
+              "        document.querySelector('#df-6bc92cd3-5978-49fc-8ba4-fd6c0ba9e4ed button.colab-df-convert');\n",
+              "      buttonEl.style.display =\n",
+              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
+              "\n",
+              "      async function convertToInteractive(key) {\n",
+              "        const element = document.querySelector('#df-6bc92cd3-5978-49fc-8ba4-fd6c0ba9e4ed');\n",
+              "        const dataTable =\n",
+              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
+              "                                                    [key], {});\n",
+              "        if (!dataTable) return;\n",
+              "\n",
+              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
+              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
+              "          + ' to learn more about interactive tables.';\n",
+              "        element.innerHTML = '';\n",
+              "        dataTable['output_type'] = 'display_data';\n",
+              "        await google.colab.output.renderOutput(dataTable, element);\n",
+              "        const docLink = document.createElement('div');\n",
+              "        docLink.innerHTML = docLinkHtml;\n",
+              "        element.appendChild(docLink);\n",
+              "      }\n",
+              "    </script>\n",
+              "  </div>\n",
+              "\n",
+              "\n",
+              "<div id=\"df-2dd3c8f4-c1d3-4294-97d2-8688b64c654b\">\n",
+              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-2dd3c8f4-c1d3-4294-97d2-8688b64c654b')\"\n",
+              "            title=\"Suggest charts\"\n",
+              "            style=\"display:none;\">\n",
+              "\n",
+              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
+              "     width=\"24px\">\n",
+              "    <g>\n",
+              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
+              "    </g>\n",
+              "</svg>\n",
+              "  </button>\n",
+              "\n",
+              "<style>\n",
+              "  .colab-df-quickchart {\n",
+              "      --bg-color: #E8F0FE;\n",
+              "      --fill-color: #1967D2;\n",
+              "      --hover-bg-color: #E2EBFA;\n",
+              "      --hover-fill-color: #174EA6;\n",
+              "      --disabled-fill-color: #AAA;\n",
+              "      --disabled-bg-color: #DDD;\n",
+              "  }\n",
+              "\n",
+              "  [theme=dark] .colab-df-quickchart {\n",
+              "      --bg-color: #3B4455;\n",
+              "      --fill-color: #D2E3FC;\n",
+              "      --hover-bg-color: #434B5C;\n",
+              "      --hover-fill-color: #FFFFFF;\n",
+              "      --disabled-bg-color: #3B4455;\n",
+              "      --disabled-fill-color: #666;\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-quickchart {\n",
+              "    background-color: var(--bg-color);\n",
+              "    border: none;\n",
+              "    border-radius: 50%;\n",
+              "    cursor: pointer;\n",
+              "    display: none;\n",
+              "    fill: var(--fill-color);\n",
+              "    height: 32px;\n",
+              "    padding: 0;\n",
+              "    width: 32px;\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-quickchart:hover {\n",
+              "    background-color: var(--hover-bg-color);\n",
+              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
+              "    fill: var(--button-hover-fill-color);\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-quickchart-complete:disabled,\n",
+              "  .colab-df-quickchart-complete:disabled:hover {\n",
+              "    background-color: var(--disabled-bg-color);\n",
+              "    fill: var(--disabled-fill-color);\n",
+              "    box-shadow: none;\n",
+              "  }\n",
+              "\n",
+              "  .colab-df-spinner {\n",
+              "    border: 2px solid var(--fill-color);\n",
+              "    border-color: transparent;\n",
+              "    border-bottom-color: var(--fill-color);\n",
+              "    animation:\n",
+              "      spin 1s steps(1) infinite;\n",
+              "  }\n",
+              "\n",
+              "  @keyframes spin {\n",
+              "    0% {\n",
+              "      border-color: transparent;\n",
+              "      border-bottom-color: var(--fill-color);\n",
+              "      border-left-color: var(--fill-color);\n",
+              "    }\n",
+              "    20% {\n",
+              "      border-color: transparent;\n",
+              "      border-left-color: var(--fill-color);\n",
+              "      border-top-color: var(--fill-color);\n",
+              "    }\n",
+              "    30% {\n",
+              "      border-color: transparent;\n",
+              "      border-left-color: var(--fill-color);\n",
+              "      border-top-color: var(--fill-color);\n",
+              "      border-right-color: var(--fill-color);\n",
+              "    }\n",
+              "    40% {\n",
+              "      border-color: transparent;\n",
+              "      border-right-color: var(--fill-color);\n",
+              "      border-top-color: var(--fill-color);\n",
+              "    }\n",
+              "    60% {\n",
+              "      border-color: transparent;\n",
+              "      border-right-color: var(--fill-color);\n",
+              "    }\n",
+              "    80% {\n",
+              "      border-color: transparent;\n",
+              "      border-right-color: var(--fill-color);\n",
+              "      border-bottom-color: var(--fill-color);\n",
+              "    }\n",
+              "    90% {\n",
+              "      border-color: transparent;\n",
+              "      border-bottom-color: var(--fill-color);\n",
+              "    }\n",
+              "  }\n",
+              "</style>\n",
+              "\n",
+              "  <script>\n",
+              "    async function quickchart(key) {\n",
+              "      const quickchartButtonEl =\n",
+              "        document.querySelector('#' + key + ' button');\n",
+              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
+              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
+              "      try {\n",
+              "        const charts = await google.colab.kernel.invokeFunction(\n",
+              "            'suggestCharts', [key], {});\n",
+              "      } catch (error) {\n",
+              "        console.error('Error during call to suggestCharts:', error);\n",
+              "      }\n",
+              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
+              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
+              "    }\n",
+              "    (() => {\n",
+              "      let quickchartButtonEl =\n",
+              "        document.querySelector('#df-2dd3c8f4-c1d3-4294-97d2-8688b64c654b button');\n",
+              "      quickchartButtonEl.style.display =\n",
+              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
+              "    })();\n",
+              "  </script>\n",
+              "</div>\n",
+              "\n",
+              "  <div id=\"id_0726ffa8-d43c-4cc1-998d-618f712e6bb9\">\n",
+              "    <style>\n",
+              "      .colab-df-generate {\n",
+              "        background-color: #E8F0FE;\n",
+              "        border: none;\n",
+              "        border-radius: 50%;\n",
+              "        cursor: pointer;\n",
+              "        display: none;\n",
+              "        fill: #1967D2;\n",
+              "        height: 32px;\n",
+              "        padding: 0 0 0 0;\n",
+              "        width: 32px;\n",
+              "      }\n",
+              "\n",
+              "      .colab-df-generate:hover {\n",
+              "        background-color: #E2EBFA;\n",
+              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
+              "        fill: #174EA6;\n",
+              "      }\n",
+              "\n",
+              "      [theme=dark] .colab-df-generate {\n",
+              "        background-color: #3B4455;\n",
+              "        fill: #D2E3FC;\n",
+              "      }\n",
+              "\n",
+              "      [theme=dark] .colab-df-generate:hover {\n",
+              "        background-color: #434B5C;\n",
+              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
+              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
+              "        fill: #FFFFFF;\n",
+              "      }\n",
+              "    </style>\n",
+              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n",
+              "            title=\"Generate code using this dataframe.\"\n",
+              "            style=\"display:none;\">\n",
+              "\n",
+              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
+              "       width=\"24px\">\n",
+              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
+              "  </svg>\n",
+              "    </button>\n",
+              "    <script>\n",
+              "      (() => {\n",
+              "      const buttonEl =\n",
+              "        document.querySelector('#id_0726ffa8-d43c-4cc1-998d-618f712e6bb9 button.colab-df-generate');\n",
+              "      buttonEl.style.display =\n",
+              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
+              "\n",
+              "      buttonEl.onclick = () => {\n",
+              "        google.colab.notebook.generateWithVariable('df');\n",
+              "      }\n",
+              "      })();\n",
+              "    </script>\n",
+              "  </div>\n",
+              "\n",
+              "    </div>\n",
+              "  </div>\n"
             ],
             "text/plain": [
               "                                  Title  \\\n",
@@ -361,12 +894,12 @@
               "2  Your Googlecar has an automatic transmission. ...   \n",
               "\n",
               "                                          Embeddings  \n",
-              "0  [-0.033361107, -0.021217084, -0.049581926, -0....  \n",
-              "1  [0.009660736, -0.030662702, -0.017281422, -0.0...  \n",
-              "2  [-0.04270796, -0.007160868, -0.03242516, -0.02...  "
+              "0  [-0.03336111, -0.021217091, -0.04958193, -0.01...  \n",
+              "1  [0.009660737, -0.030662702, -0.01728142, -0.05...  \n",
+              "2  [-0.042707954, -0.007160867, -0.03242516, -0.0...  "
             ]
           },
-          "execution_count": 5,
+          "execution_count": 7,
           "metadata": {},
           "output_type": "execute_result"
         }
@@ -374,10 +907,16 @@
       "source": [
         "# Get the embeddings of each text and add to an embeddings column in the dataframe\n",
         "def embed_fn(title, text):\n",
-        "  return genai.embed_content(model=model,\n",
-        "                             content=text,\n",
-        "                             task_type=\"retrieval_document\",\n",
-        "                             title=title)[\"embedding\"]\n",
+        "  response = client.models.embed_content(\n",
+        "        model=EMBEDDING_MODEL_ID,\n",
+        "        contents=text,\n",
+        "        config=types.EmbedContentConfig(\n",
+        "            task_type=\"retrieval_document\",\n",
+        "            title=title\n",
+        "        )\n",
+        "    )\n",
+        "\n",
+        "  return response.embeddings[0].values\n",
         "\n",
         "df['Embeddings'] = df.apply(lambda row: embed_fn(row['Title'], row['Text']), axis=1)\n",
         "df"
@@ -407,18 +946,21 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 6,
+      "execution_count": 8,
       "metadata": {
         "id": "80w2VQQ9JWcU"
       },
       "outputs": [],
       "source": [
         "query = \"How to shift gears in the Google car?\"\n",
-        "model = 'models/embedding-001'\n",
         "\n",
-        "request = genai.embed_content(model=model,\n",
-        "                              content=query,\n",
-        "                              task_type=\"retrieval_query\")"
+        "request = client.models.embed_content(\n",
+        "    model=EMBEDDING_MODEL_ID,\n",
+        "    contents=query,\n",
+        "    config=types.EmbedContentConfig(\n",
+        "        task_type=\"retrieval_document\",\n",
+        "        )\n",
+        ")"
       ]
     },
     {
@@ -432,21 +974,31 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 7,
+      "execution_count": 9,
       "metadata": {
         "id": "am36P3J9M6Zv"
       },
       "outputs": [],
       "source": [
+        "import numpy as np\n",
+        "\n",
         "def find_best_passage(query, dataframe):\n",
         "  \"\"\"\n",
         "  Compute the distances between the query and each document in the dataframe\n",
         "  using the dot product.\n",
         "  \"\"\"\n",
-        "  query_embedding = genai.embed_content(model=model,\n",
-        "                                        content=query,\n",
-        "                                        task_type=\"retrieval_query\")\n",
-        "  dot_products = np.dot(np.stack(dataframe['Embeddings']), query_embedding[\"embedding\"])\n",
+        "  query_embedding = client.models.embed_content(\n",
+        "      model=EMBEDDING_MODEL_ID,\n",
+        "      contents=query,\n",
+        "      config=types.EmbedContentConfig(\n",
+        "          task_type=\"retrieval_document\",\n",
+        "          )\n",
+        "  )\n",
+        "\n",
+        "  dot_products = np.dot(\n",
+        "      np.stack(dataframe['Embeddings']),\n",
+        "      query_embedding.embeddings[0].values\n",
+        "  )\n",
         "  idx = np.argmax(dot_products)\n",
         "  return dataframe.iloc[idx]['Text'] # Return text from index with max value"
       ]
@@ -462,18 +1014,21 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 8,
+      "execution_count": 10,
       "metadata": {
         "id": "1I5lAqdH9zWL"
       },
       "outputs": [
         {
           "data": {
+            "application/vnd.google.colaboratory.intrinsic+json": {
+              "type": "string"
+            },
             "text/plain": [
               "'Your Googlecar has an automatic transmission. To shift gears, simply move the shift lever to the desired position.  Park: This position is used when you are parked. The wheels are locked and the car cannot move. Reverse: This position is used to back up. Neutral: This position is used when you are stopped at a light or in traffic. The car is not in gear and will not move unless you press the gas pedal. Drive: This position is used to drive forward. Low: This position is used for driving in snow or other slippery conditions.'"
             ]
           },
-          "execution_count": 8,
+          "execution_count": 10,
           "metadata": {},
           "output_type": "execute_result"
         }
@@ -496,31 +1051,44 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 9,
+      "execution_count": 11,
       "metadata": {
         "id": "pqf-OsT3auTm"
       },
       "outputs": [],
       "source": [
+        "import textwrap\n",
+        "\n",
         "def make_prompt(query, relevant_passage):\n",
-        "  escaped = relevant_passage.replace(\"'\", \"\").replace('\"', \"\").replace(\"\\n\", \" \")\n",
-        "  prompt = textwrap.dedent(\"\"\"You are a helpful and informative bot that answers questions using text from the reference passage included below. \\\n",
-        "  Be sure to respond in a complete sentence, being comprehensive, including all relevant background information. \\\n",
-        "  However, you are talking to a non-technical audience, so be sure to break down complicated concepts and \\\n",
-        "  strike a friendly and converstional tone. \\\n",
-        "  If the passage is irrelevant to the answer, you may ignore it.\n",
-        "  QUESTION: '{query}'\n",
-        "  PASSAGE: '{relevant_passage}'\n",
+        "  escaped = (\n",
+        "      relevant_passage\n",
+        "      .replace(\"'\", \"\")\n",
+        "      .replace('\"', \"\")\n",
+        "      .replace(\"\\n\", \" \")\n",
+        "  )\n",
+        "  prompt = textwrap.dedent(\"\"\"\n",
+        "    You are a helpful and informative bot that answers questions using text\n",
+        "    from the reference passage included below. Be sure to respond in a\n",
+        "    complete sentence, being comprehensive, including all relevant\n",
+        "    background information.\n",
+        "\n",
+        "    However, you are talking to a non-technical audience, so be sure to\n",
+        "    break down complicated concepts and strike a friendly and conversational\n",
+        "    tone. If the passage is irrelevant to the answer, you may ignore it.\n",
+        "\n",
+        "    QUESTION: '{query}'\n",
+        "    PASSAGE: '{relevant_passage}'\n",
         "\n",
         "    ANSWER:\n",
         "  \"\"\").format(query=query, relevant_passage=escaped)\n",
         "\n",
+        "\n",
         "  return prompt"
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": 10,
+      "execution_count": 12,
       "metadata": {
         "id": "mlpDRG3cVvQE"
       },
@@ -529,11 +1097,20 @@
           "name": "stdout",
           "output_type": "stream",
           "text": [
-            "You are a helpful and informative bot that answers questions using text from the reference passage included below.   Be sure to respond in a complete sentence, being comprehensive, including all relevant background information.   However, you are talking to a non-technical audience, so be sure to break down complicated concepts and   strike a friendly and converstional tone.   If the passage is irrelevant to the answer, you may ignore it.\n",
-            "  QUESTION: 'How to shift gears in the Google car?'\n",
-            "  PASSAGE: 'Your Googlecar has an automatic transmission. To shift gears, simply move the shift lever to the desired position.  Park: This position is used when you are parked. The wheels are locked and the car cannot move. Reverse: This position is used to back up. Neutral: This position is used when you are stopped at a light or in traffic. The car is not in gear and will not move unless you press the gas pedal. Drive: This position is used to drive forward. Low: This position is used for driving in snow or other slippery conditions.'\n",
             "\n",
-            "    ANSWER:\n",
+            "You are a helpful and informative bot that answers questions using text\n",
+            "from the reference passage included below. Be sure to respond in a\n",
+            "complete sentence, being comprehensive, including all relevant\n",
+            "background information.\n",
+            "\n",
+            "However, you are talking to a non-technical audience, so be sure to\n",
+            "break down complicated concepts and strike a friendly and conversational\n",
+            "tone. If the passage is irrelevant to the answer, you may ignore it.\n",
+            "\n",
+            "QUESTION: 'How to shift gears in the Google car?'\n",
+            "PASSAGE: 'Your Googlecar has an automatic transmission. To shift gears, simply move the shift lever to the desired position.  Park: This position is used when you are parked. The wheels are locked and the car cannot move. Reverse: This position is used to back up. Neutral: This position is used when you are stopped at a light or in traffic. The car is not in gear and will not move unless you press the gas pedal. Drive: This position is used to drive forward. Low: This position is used for driving in snow or other slippery conditions.'\n",
+            "\n",
+            "ANSWER:\n",
             "\n"
           ]
         }
@@ -554,7 +1131,7 @@
     },
     {
       "cell_type": "code",
-      "execution_count": 11,
+      "execution_count": 13,
       "metadata": {
         "id": "B3fDj-jv5Sq_"
       },
@@ -563,59 +1140,84 @@
           "name": "stdout",
           "output_type": "stream",
           "text": [
-            "models/gemini-1.0-pro\n",
-            "models/gemini-1.0-pro-001\n",
-            "models/gemini-1.0-pro-latest\n",
-            "models/gemini-2.0-flash\n",
-            "models/gemini-2.0-flash\n",
-            "models/gemini-2.0-flash\n",
-            "models/gemini-1.5-pro\n",
-            "models/gemini-1.5-pro-001\n",
+            "models/gemini-1.0-pro-vision-latest\n",
+            "models/gemini-pro-vision\n",
             "models/gemini-1.5-pro-latest\n",
-            "models/gemini-pro\n"
+            "models/gemini-1.5-pro-001\n",
+            "models/gemini-1.5-pro-002\n",
+            "models/gemini-1.5-pro\n",
+            "models/gemini-1.5-flash-latest\n",
+            "models/gemini-1.5-flash-001\n",
+            "models/gemini-1.5-flash-001-tuning\n",
+            "models/gemini-1.5-flash\n",
+            "models/gemini-1.5-flash-002\n",
+            "models/gemini-1.5-flash-8b\n",
+            "models/gemini-1.5-flash-8b-001\n",
+            "models/gemini-1.5-flash-8b-latest\n",
+            "models/gemini-1.5-flash-8b-exp-0827\n",
+            "models/gemini-1.5-flash-8b-exp-0924\n",
+            "models/gemini-2.0-flash-exp\n",
+            "models/gemini-2.0-flash\n",
+            "models/gemini-2.0-flash-001\n",
+            "models/gemini-2.0-flash-exp-image-generation\n",
+            "models/gemini-2.0-flash-lite-001\n",
+            "models/gemini-2.0-flash-lite\n",
+            "models/gemini-2.0-flash-lite-preview-02-05\n",
+            "models/gemini-2.0-flash-lite-preview\n",
+            "models/gemini-2.0-pro-exp\n",
+            "models/gemini-2.0-pro-exp-02-05\n",
+            "models/gemini-exp-1206\n",
+            "models/gemini-2.0-flash-thinking-exp-01-21\n",
+            "models/gemini-2.0-flash-thinking-exp\n",
+            "models/gemini-2.0-flash-thinking-exp-1219\n",
+            "models/learnlm-1.5-pro-experimental\n",
+            "models/gemma-3-27b-it\n"
           ]
         }
       ],
       "source": [
-        "for m in genai.list_models():\n",
-        "  if 'generateContent' in m.supported_generation_methods:\n",
-        "    print(m.name)"
+        "for m in client.models.list():\n",
+        "  if 'generateContent' in m.supported_actions:\n",
+        "      print(m.name)"
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": 12,
+      "execution_count": 14,
       "metadata": {
         "id": "m30avD9cfQQ-"
       },
       "outputs": [],
       "source": [
-        "model = genai.GenerativeModel('models/gemini-2.0-flash')\n",
-        "answer = model.generate_content(prompt)"
+        "MODEL_ID = \"gemini-2.0-flash\" # @param [\"gemini-2.0-flash-lite\",\"gemini-2.0-flash\",\"gemini-2.0-pro-exp-02-05\"] {\"allow-input\":true, isTemplate: true}\n",
+        "answer = client.models.generate_content(\n",
+        "    model=MODEL_ID,\n",
+        "    contents=prompt,\n",
+        ")"
       ]
     },
     {
       "cell_type": "code",
-      "execution_count": 13,
+      "execution_count": 15,
       "metadata": {
         "id": "COBhn6J9S_xI"
       },
       "outputs": [
         {
           "data": {
-            "text/markdown": [
-              "The Google car has an automatic transmission, so you don't need to shift gears manually. \n"
-            ],
+            "text/markdown": "Hey there! Shifting gears in your Googlecar is super easy because it has an automatic transmission! To change gears, just move the shift lever to the position you want. There's \"Park\" for when you're stopped, which locks the wheels, \"Reverse\" to back up, \"Neutral\" for when you're briefly stopped like at a light, \"Drive\" for normal forward motion, and \"Low\" which is helpful when driving in slippery conditions like snow.\n",
             "text/plain": [
               "<IPython.core.display.Markdown object>"
             ]
           },
-          "execution_count": 13,
+          "execution_count": 15,
           "metadata": {},
           "output_type": "execute_result"
         }
       ],
       "source": [
+        "from IPython.display import Markdown\n",
+        "\n",
         "Markdown(answer.text)"
       ]
     },


Reviews:
user: login: Giom-V
body:  
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T09:21:51Z
user: login: Giom-V
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T09:23:21Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:15:09Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:16:30Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:22:07Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:27:30Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:27:41Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:38:55Z
user: login: andycandy
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-25T16:39:15Z
user: login: Giom-V
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-31T08:10:06Z
user: login: Giom-V
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-31T08:12:47Z
user: login: Giom-V
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-31T08:34:06Z

Review comments:
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: <p>I think you overwrote the change I pushed yesterday. Can you update the button to use an image instead?</p><p><code></code><code></p><p>&lt;a target=\"_blank\" href=\"URL\"&gt;&lt;img src=\"<a href="https://colab.research.google.com/assets/colab-badge.svg/%22" target="_blank">https://colab.research.google.com/assets/colab-badge.svg\"</a> height=30/&gt;</p><p></code><code></code></p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669812'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='3'/>
created_at: 2025-03-25T09:21:50Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: <p>Nitpicking: Can you just say "select you model" in the title and write the whole text below? I think currently that makes quite a big title...</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669815'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='8'/>
created_at: 2025-03-25T09:21:50Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #12.        contents=directions_prompt)
</pre><p>Nit: Can you just add a new line before the closing ")" ?</p><p> </p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669818'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='14'/>
created_at: 2025-03-25T09:21:50Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #8.      Transport = [forms of transport]"""
</pre><p>Nit: Can you just add a new line before the closing <code>"""</code> ?</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669819'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='16'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #12.        contents=directions_list_prompt)
</pre><p>Nit: Can you just add a new line before the closing ")" ?</p><p> </p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669823'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='16'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #5.      Return your answer in a list:"""
</pre><p>Nit: Can you just add a new line before the closing&nbsp;<code>"""</code>&nbsp;?</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669827'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='19'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #9.        contents=phone_prompt)
</pre><p>Nit: Can you just add a new line before the closing ")" ?</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669830'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='19'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #11.        contents=url_prompt)
</pre><p>Nit: Can you just add a new line before the closing ")" ?</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669836'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='22'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: <p>I think you overwrote the change I pushed yesterday. Can you update the button to use an image instead?</p><p><code></code><code></p><p>&lt;a target=\"_blank\" href=\"URL\"&gt;&lt;img src=\"<a href="https://colab.research.google.com/assets/colab-badge.svg/%22" target="_blank">https://colab.research.google.com/assets/colab-badge.svg\"</a> height=30/&gt;</p><p></code><code></code></p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669838'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='3'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #4.    sample_text = (
</pre><p>I think we should refactor that text to be easier to read, as the current format is awful... Can you rewrite it using <code>"""</code>?</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669841'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='10'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #9.          model=model,
</pre><p>I think you forgot to change the model variable here</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669845'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='20'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #1.    model = 'models/gemini-2.0-flash'
</pre><p>Can you add a "MODEL_ID" variable like this?</p><p> </p><p><code>MODEL_ID="gemini-2.0-flash" # @param ["gemini-2.0-flash-lite","gemini-2.0-flash","gemini-2.0-pro-exp-02-05"] {"allow-input":true, isTemplate: true}</code></p><p> </p><p>As it would make the notebook easier to maintain in the future.</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669848'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='28'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: 

<pre class="ql-syntax" spellcheck="false">Line #4.        contents= prompt)
</pre><p>Can you just add a new line before the closing ")" ?</p>
<br/>

 _Reply via <a href='https://app.reviewnb.com/google-gemini/cookbook/pull/504/discussion/#comment-2011669852'>ReviewNB</a>_ <div id='ReviewNBCommentContext-DoNotDelete' style='display:none' data-state='RESOLVED' data-cellIndex='28'/>
created_at: 2025-03-25T09:21:51Z
author_association: COLLABORATOR
path: examples/Entity_Extraction.ipynb
user: login: Giom-V
body: This notebook is missing a "Next steps" section at the end. Can you add one that points to related/interested other notebooks from the cookbook? Please use relative links as they work in colab/IDEs/etc...
created_at: 2025-03-25T09:23:21Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: andycandy
body: <p>Alright done!</p>
created_at: 2025-03-25T16:15:09Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: andycandy
body: <p>Added a breakline</p>
created_at: 2025-03-25T16:16:30Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: andycandy
body: <p>alright, i can do that</p>
created_at: 2025-03-25T16:22:07Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: andycandy
body: <p>yeah, i did </p>
created_at: 2025-03-25T16:27:30Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: andycandy
body: <p>fixed that</p>
created_at: 2025-03-25T16:27:41Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "KLHiTPXNTf2a"
path: examples/Entity_Extraction.ipynb
user: login: andycandy
body: done!
created_at: 2025-03-25T16:38:55Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: andycandy
body: Implemented
created_at: 2025-03-25T16:39:14Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: <p>I fixed it myself</p>
created_at: 2025-03-31T08:10:06Z
author_association: COLLABORATOR
diff_hunk: @@ -6,7 +6,7 @@
         "id": "Tce3stUlHN0L"
path: examples/Talk_to_documents_with_embeddings.ipynb
user: login: Giom-V
body: <p>I did it myself in github to save time, hopefully it did not break the formatting...</p>
created_at: 2025-03-31T08:12:47Z
author_association: COLLABORATOR

PR comments:
user: login: review-notebook-app[bot]
created_at: 2025-03-04T21:15:50Z
body: Check out this pull request on&nbsp; <a href="https://app.reviewnb.com/google-gemini/cookbook/pull/504"><img align="absmiddle"  alt="ReviewNB" height="28" class="BotMessageButtonImage" src="https://raw.githubusercontent.com/ReviewNB/support/master/images/button_reviewnb.png"/></a> 

 See visual diffs & provide feedback on Jupyter Notebooks. 

---

 <i>Powered by <a href='https://www.reviewnb.com/?utm_source=gh'>ReviewNB</a></i>
author_association: NONE
user: login: markmcd
created_at: 2025-03-24T08:04:23Z
body: Thanks for the PR. Before we dig into this can you:

1. Run `nbfmt`
2. Merge / rebase latest changes
3. Limit to one notebook per PR
author_association: MEMBER
user: login: andycandy
created_at: 2025-03-24T08:35:34Z
body: > Thanks for the PR. Before we dig into this can you:
> 
> 1. Run `nbfmt`
> 2. Merge / rebase latest changes
> 3. Limit to one notebook per PR

@markmcd Sure! I'll keep this in mind and commit the required changes
author_association: COLLABORATOR
user: login: andycandy
created_at: 2025-03-24T18:24:45Z
body: @markmcd 

> Thanks for the PR. Before we dig into this can you:
> 
> 1. Run `nbfmt`
> 2. Merge / rebase latest changes
> 3. Limit to one notebook per PR

I did the first two, should I close this PR and create 2 separate ones?
author_association: COLLABORATOR
user: login: Giom-V
created_at: 2025-03-25T09:13:05Z
body: > should I close this PR and create 2 separate ones?

Don't bother, I'll do the review here.
author_association: COLLABORATOR
user: login: Giom-V
created_at: 2025-03-25T09:24:24Z
body: @andycandy Thanks for the submission.

I just added a couple of minor comments to make the notebook easier to understand and to maintain. Nothing critical :)

Thanks again!

author_association: COLLABORATOR
user: login: andycandy
created_at: 2025-03-25T16:41:14Z
body: @Giom-V I implemented all your suggestions, again, thank you so much for your cooperation!
author_association: COLLABORATOR
user: login: Giom-V
created_at: 2025-03-31T08:36:01Z
body: Thanks @andycandy! It's approved and merged.
author_association: COLLABORATOR