Skip to content
Draft
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
26 changes: 23 additions & 3 deletions packages/firebase_ai/firebase_ai/example/lib/pages/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,33 @@ class _ChatPageState extends State<ChatPage> {
);
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();
Expand Down
Loading