From a8ac99e911697a5f3d03fe4c2947abf675ffab1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ros=C3=A1rio=20P=2E=20Fernandes?= Date: Thu, 15 Feb 2024 16:35:17 +0000 Subject: [PATCH] update model names to use generations (#62) Googlers see [b/325447428](http://b/325447428) --- README.md | 2 +- .../com/google/ai/sample/GenerativeAiViewModelFactory.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 00444dba..622b823a 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ For example, with just a few lines of code, you can access Gemini's multimodal c ```kotlin val generativeModel = GenerativeModel( - modelName = "gemini-pro-vision", + modelName = "gemini-1.0-pro-vision-latest", apiKey = BuildConfig.apiKey ) diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt index 007606bc..ff0b98d4 100644 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt +++ b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt @@ -40,7 +40,7 @@ val GenerativeViewModelFactory = object : ViewModelProvider.Factory { // Initialize a GenerativeModel with the `gemini-pro` AI model // for text generation val generativeModel = GenerativeModel( - modelName = "gemini-pro", + modelName = "gemini-1.0-pro", apiKey = BuildConfig.apiKey, generationConfig = config ) @@ -51,7 +51,7 @@ val GenerativeViewModelFactory = object : ViewModelProvider.Factory { // Initialize a GenerativeModel with the `gemini-pro-vision` AI model // for multimodal text generation val generativeModel = GenerativeModel( - modelName = "gemini-pro-vision", + modelName = "gemini-1.0-pro-vision-latest", apiKey = BuildConfig.apiKey, generationConfig = config ) @@ -61,7 +61,7 @@ val GenerativeViewModelFactory = object : ViewModelProvider.Factory { isAssignableFrom(ChatViewModel::class.java) -> { // Initialize a GenerativeModel with the `gemini-pro` AI model for chat val generativeModel = GenerativeModel( - modelName = "gemini-pro", + modelName = "gemini-1.0-pro", apiKey = BuildConfig.apiKey, generationConfig = config )