From a58fdc55e7c853955cb7886bb411faf90097546b Mon Sep 17 00:00:00 2001 From: Mark Daoust Date: Mon, 10 Jun 2024 14:30:37 -0700 Subject: [PATCH] remove references to pro-vision --- .../langchain_quickstart_node/main.js | 2 +- ...Gemini_LangChain_QA_Pinecone_WebLoad.ipynb | 2 +- ...i_LlamaIndex_QA_Chroma_WebPageReader.ipynb | 2 +- .../gemini-api/docs/get-started/python.ipynb | 2 +- .../en/gemini-api/docs/get-started/rest.ipynb | 42 +------------------ .../docs/prompting_with_media.ipynb | 4 +- .../tutorials/document_search.ipynb | 5 +-- .../aistudio_gemini_prompt_freeform.ipynb | 2 +- .../aistudio_gemini_prompt_freeform_b64.ipynb | 2 +- 9 files changed, 11 insertions(+), 52 deletions(-) diff --git a/examples/gemini/javascript/langchain_quickstart_node/main.js b/examples/gemini/javascript/langchain_quickstart_node/main.js index b26e156ea..14d8ed958 100644 --- a/examples/gemini/javascript/langchain_quickstart_node/main.js +++ b/examples/gemini/javascript/langchain_quickstart_node/main.js @@ -44,7 +44,7 @@ async function invokeGeminiPro() { */ async function invokeGeminiProVision() { const model = new ChatGoogleGenerativeAI({ - modelName: 'gemini-pro-vision', + modelName: 'gemini-1.5-flash', maxOutputTokens: 1024, }); diff --git a/examples/gemini/python/langchain/Gemini_LangChain_QA_Pinecone_WebLoad.ipynb b/examples/gemini/python/langchain/Gemini_LangChain_QA_Pinecone_WebLoad.ipynb index f7ba368e5..6090249d6 100644 --- a/examples/gemini/python/langchain/Gemini_LangChain_QA_Pinecone_WebLoad.ipynb +++ b/examples/gemini/python/langchain/Gemini_LangChain_QA_Pinecone_WebLoad.ipynb @@ -200,7 +200,7 @@ "### Grab a Gemini API Key\n", "\n", "To use Gemini you need an *API key*. You can create an API key with one click in [Google AI Studio](https://makersuite.google.com/).\n", - "After creating the API key, you can either set an environment variable named `GOOGLE_API_KEY` to your API Key or pass the API key as an argument when using the `ChatGoogleGenerativeAI` class to access Google's `gemini-pro` and `gemini-pro-vision` models or the `GoogleGenerativeAIEmbeddings` class to access Google's Generative AI embedding model using `LangChain`.\n", + "After creating the API key, you can either set an environment variable named `GOOGLE_API_KEY` to your API Key or pass the API key as an argument when using the `ChatGoogleGenerativeAI` class to access Google's `gemini-1.5-flash` or `gemini-1.5-pro` models or the `GoogleGenerativeAIEmbeddings` class to access Google's Generative AI embedding model using `LangChain`.\n", "\n", "In this tutorial, you will set the environment variable `GOOGLE_API_KEY` to configure Gemini to use your API key." ] diff --git a/examples/gemini/python/llamaindex/Gemini_LlamaIndex_QA_Chroma_WebPageReader.ipynb b/examples/gemini/python/llamaindex/Gemini_LlamaIndex_QA_Chroma_WebPageReader.ipynb index be01899a2..7e1dd0250 100644 --- a/examples/gemini/python/llamaindex/Gemini_LlamaIndex_QA_Chroma_WebPageReader.ipynb +++ b/examples/gemini/python/llamaindex/Gemini_LlamaIndex_QA_Chroma_WebPageReader.ipynb @@ -189,7 +189,7 @@ "### Grab an API Key\n", "\n", "To use Gemini you need an *API key*. You can create an API key with one click in [Google AI Studio](https://makersuite.google.com/).\n", - "After creating the API key, you can either set an environment variable named `GOOGLE_API_KEY` to your API Key or pass the API key as an argument when using the `Gemini` class to access Google's `gemini-pro` and `gemini-pro-vision` models or the `GeminiEmbedding` class to access Google's Generative AI embedding model using `LlamaIndex`.\n", + "After creating the API key, you can either set an environment variable named `GOOGLE_API_KEY` to your API Key or pass the API key as an argument when using the `Gemini` class to access Google's `gemini-1.5-flash` and `gemini-1.5-pro` models or the `GeminiEmbedding` class to access Google's Generative AI embedding model using `LlamaIndex`.\n", "\n", "In this tutorial, you will set the variable `gemini_api_key` to configure Gemini to use your API key." ] diff --git a/site/en/gemini-api/docs/get-started/python.ipynb b/site/en/gemini-api/docs/get-started/python.ipynb index c50f732f2..bb96b7435 100644 --- a/site/en/gemini-api/docs/get-started/python.ipynb +++ b/site/en/gemini-api/docs/get-started/python.ipynb @@ -652,7 +652,7 @@ "source": [ "## Generate text from image and text inputs\n", "\n", - "Gemini provides a multimodal model (`gemini-pro-vision`) that accepts both text and images and inputs. The `GenerativeModel.generate_content` API is designed to handle multimodal prompts and returns a text output.\n", + "The `GenerativeModel.generate_content` API is designed to handle multimodal prompts and returns a text output.\n", "\n", "Let's include an image:" ] diff --git a/site/en/gemini-api/docs/get-started/rest.ipynb b/site/en/gemini-api/docs/get-started/rest.ipynb index 463c6f21a..6114babea 100644 --- a/site/en/gemini-api/docs/get-started/rest.ipynb +++ b/site/en/gemini-api/docs/get-started/rest.ipynb @@ -226,7 +226,6 @@ "source": [ "### Text-and-image input\n", "\n", - "If the input contains both text and image, use the `gemini-pro-vision` model.\n", "The following snippets help you build a request and send it to the REST API." ] }, @@ -320,7 +319,7 @@ ], "source": [ "%%bash\n", - "curl https://generativelanguage.googleapis.com/v1beta/models/gemini-pro-vision:generateContent?key=${GOOGLE_API_KEY} \\\n", + "curl https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=${GOOGLE_API_KEY} \\\n", " -H 'Content-Type: application/json' \\\n", " -d @request.json 2> /dev/null | grep \"text\"" ] @@ -371,15 +370,6 @@ " }' 2> /dev/null | grep \"text\"" ] }, - { - "cell_type": "markdown", - "metadata": { - "id": "IuAPMg_9U2GR" - }, - "source": [ - "Note: The `gemini-pro-vision` model (for text-and-image input) is not yet optimized for multi-turn conversations. Make sure to use `gemini-pro` and text-only input for chat use cases." - ] - }, { "cell_type": "markdown", "metadata": { @@ -792,36 +782,6 @@ " \"topK\": 1\n", " },\n", " {\n", - " \"name\": \"models/gemini-pro-vision\",\n", - " \"version\": \"001\",\n", - " \"displayName\": \"Gemini Pro Vision\",\n", - " \"description\": \"The best image understanding model to handle a broad range of applications\",\n", - " \"inputTokenLimit\": 12288,\n", - " \"outputTokenLimit\": 4096,\n", - " \"supportedGenerationMethods\": [\n", - " \"generateContent\",\n", - " \"countTokens\"\n", - " ],\n", - " \"temperature\": 0.4,\n", - " \"topP\": 1,\n", - " \"topK\": 32\n", - " },\n", - " {\n", - " \"name\": \"models/gemini-ultra\",\n", - " \"version\": \"001\",\n", - " \"displayName\": \"Gemini Ultra\",\n", - " \"description\": \"The most capable model for highly complex tasks\",\n", - " \"inputTokenLimit\": 30720,\n", - " \"outputTokenLimit\": 2048,\n", - " \"supportedGenerationMethods\": [\n", - " \"generateContent\",\n", - " \"countTokens\"\n", - " ],\n", - " \"temperature\": 0.9,\n", - " \"topP\": 1,\n", - " \"topK\": 32\n", - " },\n", - " {\n", " \"name\": \"models/embedding-001\",\n", " \"version\": \"001\",\n", " \"displayName\": \"Embedding 001\",\n", diff --git a/site/en/gemini-api/docs/prompting_with_media.ipynb b/site/en/gemini-api/docs/prompting_with_media.ipynb index 73237b854..5096dbc42 100644 --- a/site/en/gemini-api/docs/prompting_with_media.ipynb +++ b/site/en/gemini-api/docs/prompting_with_media.ipynb @@ -481,7 +481,7 @@ "\n", "### Image formats\n", "\n", - "You can use image data for prompting with the `gemini-pro-vision` and `gemini-1.5-pro ` models. When you use images for prompting, they are subject to the following limitations and requirements:\n", + "You can use image data for prompting Gemini models. When you use images for prompting, they are subject to the following limitations and requirements:\n", "\n", "- Images must be in one of the following image data [MIME types](https://developers.google.com/drive/api/guides/ref-export-formats):\n", " - PNG - image/png\n", @@ -489,7 +489,7 @@ " - WEBP - image/webp\n", " - HEIC - image/heic\n", " - HEIF - image/heif\n", - "- Maximum of 16 individual images for the `gemini-pro-vision` and 3600 images for `gemini-1.5-pro`\n", + "- Maximum of 3600 images for `gemini-1.5-pro`\n", "- No specific limits to the number of pixels in an image; however, larger images are scaled down to fit a maximum resolution of 3072 x 3072 while preserving their original aspect ratio.\n", "\n", "### Audio formats\n", diff --git a/site/en/gemini-api/tutorials/document_search.ipynb b/site/en/gemini-api/tutorials/document_search.ipynb index 49ef82660..26dacb36b 100644 --- a/site/en/gemini-api/tutorials/document_search.ipynb +++ b/site/en/gemini-api/tutorials/document_search.ipynb @@ -1170,9 +1170,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "models/gemini-pro\n", - "models/gemini-pro-vision\n", - "models/gemini-ultra\n" + "models/gemini-1.5-pro\n", + "models/gemini-1.5-flash\n" ] } ], diff --git a/templates/aistudio_gemini_prompt_freeform.ipynb b/templates/aistudio_gemini_prompt_freeform.ipynb index 31dfaf1fd..dc5897e9f 100644 --- a/templates/aistudio_gemini_prompt_freeform.ipynb +++ b/templates/aistudio_gemini_prompt_freeform.ipynb @@ -162,7 +162,7 @@ "source": [ "import json\n", "\n", - "model = \"gemini-pro-vision\" # @param {isTemplate: true}\n", + "model = \"gemini-1.5-flash\" # @param {isTemplate: true}\n", "contents = '[{\"parts\": [{\"text\":\"what\\'s in this picture:\"}, {\"image\": {\"image_url\": \"https://storage.googleapis.com/generativeai-downloads/images/scones.jpg\"}}]}]' # @param {isTemplate: true}\n", "generation_config = \"{}\" # @param {isTemplate: true}\n", "safety_settings = \"{}\" # @param {isTemplate: true}\n", diff --git a/templates/aistudio_gemini_prompt_freeform_b64.ipynb b/templates/aistudio_gemini_prompt_freeform_b64.ipynb index 2a21af25e..e1c7aa7d8 100644 --- a/templates/aistudio_gemini_prompt_freeform_b64.ipynb +++ b/templates/aistudio_gemini_prompt_freeform_b64.ipynb @@ -174,7 +174,7 @@ }, "outputs": [], "source": [ - "model = \"gemini-pro-vision\" # @param {isTemplate: true}\n", + "model = \"gemini-1.5-flash\" # @param {isTemplate: true}\n", "contents_b64 = 'W3sicGFydHMiOiBbeyJ0ZXh0Ijoid2hhdCdzIGluIHRoaXMgcGljdHVyZToifSwgeyJpbWFnZSI6IHsiaW1hZ2VfdXJsIjogImh0dHBzOi8vc3RvcmFnZS5nb29nbGVhcGlzLmNvbS9nZW5lcmF0aXZlYWktZG93bmxvYWRzL2ltYWdlcy9zY29uZXMuanBnIn19XX1d' # @param {isTemplate: true}\n", "generation_config_b64 = \"e30=\" # @param {isTemplate: true}\n", "safety_settings_b64 = \"e30=\" # @param {isTemplate: true}\n",