@@ -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