Skip to content

Commit 023e85b

Browse files
chore: update example app for reproduction
1 parent a5ba632 commit 023e85b

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

packages/firebase_ai/firebase_ai/example/lib/pages/chat_page.dart

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,33 @@ class _ChatPageState extends State<ChatPage> {
5858
);
5959
if (widget.useVertexBackend) {
6060
_model = FirebaseAI.vertexAI(auth: FirebaseAuth.instance).generativeModel(
61-
model: 'gemini-2.5-flash',
61+
//
62+
model: 'gemini-3-pro-preview',
6263
generationConfig: generationConfig,
6364
);
6465
} else {
6566
_model = FirebaseAI.googleAI(auth: FirebaseAuth.instance).generativeModel(
66-
model: 'gemini-2.5-flash',
67-
generationConfig: generationConfig,
67+
model: 'gemini-3-pro-preview',
68+
generationConfig: GenerationConfig(
69+
thinkingConfig: ThinkingConfig(thinkingBudget: 24576), // high
70+
),
71+
tools: [
72+
Tool.functionDeclarations([
73+
FunctionDeclaration(
74+
'fetchWeather',
75+
'Fetch the weather for a given location and date',
76+
parameters: {
77+
'location': Schema.string(),
78+
'date': Schema.string(),
79+
},
80+
optionalParameters: ['date'],
81+
),
82+
]),
83+
],
84+
toolConfig: ToolConfig(
85+
functionCallingConfig: FunctionCallingConfig.auto(),
86+
),
87+
systemInstruction: Content.system('You are a helpful assistant that can fetch the weather for a given location and date.'),
6888
);
6989
}
7090
_chat = _model?.startChat();

0 commit comments

Comments
 (0)