Skip to content
Open
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
23 changes: 19 additions & 4 deletions firebase_ai_logic_showcase/lib/demos/chat/models/gemini_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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.
Expand All @@ -38,12 +38,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,
Expand All @@ -55,6 +55,21 @@ 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) {
Expand Down