diff --git a/firebase_ai_logic_showcase/lib/demos/chat_nano/chat_nano_demo.dart b/firebase_ai_logic_showcase/lib/demos/chat_nano/chat_nano_demo.dart index 1ebabb3..82c399e 100644 --- a/firebase_ai_logic_showcase/lib/demos/chat_nano/chat_nano_demo.dart +++ b/firebase_ai_logic_showcase/lib/demos/chat_nano/chat_nano_demo.dart @@ -53,7 +53,7 @@ class ChatDemoNanoState extends ConsumerState { void initState() { super.initState(); _chatService = ChatService(ref); - geminiModels.selectModel('gemini-2.5-flash-image-preview'); + geminiModels.selectModel('gemini-2.5-flash-image'); _chatService.init(); _userTextInputController.text = 'Hot air balloons rising over the San Francisco Bay at golden hour with a view of the Golden Gate Bridge. Make it anime style.'; diff --git a/firebase_ai_logic_showcase/lib/shared/models/gemini_model.dart b/firebase_ai_logic_showcase/lib/shared/models/gemini_model.dart index 33c7507..7eb36f2 100644 --- a/firebase_ai_logic_showcase/lib/shared/models/gemini_model.dart +++ b/firebase_ai_logic_showcase/lib/shared/models/gemini_model.dart @@ -32,7 +32,7 @@ class GeminiModel { } class GeminiModels { - String selectedModelName = 'gemini-2.5-flash-image-preview'; + String selectedModelName = 'gemini-2.5-flash-image'; GeminiModel get selectedModel => models[selectedModelName]!; /// A map of Gemini models that can be used in the Chat Demo. @@ -52,12 +52,12 @@ class GeminiModels { ), defaultPrompt: 'Hey Gemini! Can you set the app color to purple?', ), - 'gemini-2.5-flash-image-preview': GeminiModel( - name: 'gemini-2.5-flash-image-preview', + 'gemini-2.5-flash-image': GeminiModel( + name: 'gemini-2.5-flash-image', description: 'Our standard Flash model upgraded for rapid creative workflows with image generation and conversational, multi-turn editing capabilities.', model: FirebaseAI.googleAI().generativeModel( - model: 'gemini-2.5-flash-image-preview', + model: 'gemini-2.5-flash-image', generationConfig: GenerationConfig( responseModalities: [ ResponseModalities.text, @@ -69,6 +69,22 @@ class GeminiModels { 'Hot air balloons rising over the San Francisco Bay at golden hour ' 'with a view of the Golden Gate Bridge. Make it anime style.', ), + 'gemini-2.5-pro': GeminiModel( + name: 'gemini-2.5-pro', + description: + 'Our state-of-the-art thinking model, capable of reasoning over complex problems in code, math, and STEM, as well as analyzing large datasets, codebases, and documents using long context.', + model: FirebaseAI.googleAI().generativeModel( + model: 'gemini-2.5-pro', + tools: [ + Tool.functionDeclarations([setAppColorTool, generateImageTool]), + ], + generationConfig: GenerationConfig( + responseModalities: [ResponseModalities.text], + ), + ), + defaultPrompt: + 'If you roll 2 dices, what are the odds that you roll "7" ?', + ), }; GeminiModel selectModel(String modelName) {