From 023e85be13f71ab67e529cd47a1564859f46c63e Mon Sep 17 00:00:00 2001 From: russellwheatley Date: Tue, 13 Jan 2026 15:03:03 +0000 Subject: [PATCH] chore: update example app for reproduction --- .../example/lib/pages/chat_page.dart | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/firebase_ai/firebase_ai/example/lib/pages/chat_page.dart b/packages/firebase_ai/firebase_ai/example/lib/pages/chat_page.dart index c4d4b5798d83..9e1c83043ffc 100644 --- a/packages/firebase_ai/firebase_ai/example/lib/pages/chat_page.dart +++ b/packages/firebase_ai/firebase_ai/example/lib/pages/chat_page.dart @@ -58,13 +58,33 @@ class _ChatPageState extends State { ); if (widget.useVertexBackend) { _model = FirebaseAI.vertexAI(auth: FirebaseAuth.instance).generativeModel( - model: 'gemini-2.5-flash', + // + model: 'gemini-3-pro-preview', generationConfig: generationConfig, ); } else { _model = FirebaseAI.googleAI(auth: FirebaseAuth.instance).generativeModel( - model: 'gemini-2.5-flash', - generationConfig: generationConfig, + model: 'gemini-3-pro-preview', + generationConfig: GenerationConfig( + thinkingConfig: ThinkingConfig(thinkingBudget: 24576), // high + ), + tools: [ + Tool.functionDeclarations([ + FunctionDeclaration( + 'fetchWeather', + 'Fetch the weather for a given location and date', + parameters: { + 'location': Schema.string(), + 'date': Schema.string(), + }, + optionalParameters: ['date'], + ), + ]), + ], + toolConfig: ToolConfig( + functionCallingConfig: FunctionCallingConfig.auto(), + ), + systemInstruction: Content.system('You are a helpful assistant that can fetch the weather for a given location and date.'), ); } _chat = _model?.startChat();