Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to pro-vision #450

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
Expand Down
2 changes: 1 addition & 1 deletion site/en/gemini-api/docs/get-started/python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
]
Expand Down
42 changes: 1 addition & 41 deletions site/en/gemini-api/docs/get-started/rest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
Expand Down Expand Up @@ -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\""
]
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions site/en/gemini-api/docs/prompting_with_media.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,15 @@
"\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",
" - JPEG - image/jpeg\n",
" - 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",
Expand Down
5 changes: 2 additions & 3 deletions site/en/gemini-api/tutorials/document_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion templates/aistudio_gemini_prompt_freeform.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion templates/aistudio_gemini_prompt_freeform_b64.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading