Skip to content
Merged
Show file tree
Hide file tree
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
29 changes: 16 additions & 13 deletions sites/docs/src/content/ai/ai-toolkit/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ dependencies:

<li><b>Configuration</b>

The AI Toolkit supports both the Gemini endpoint (for prototyping) and the
Vertex endpoint (for production). Both require a Firebase project and the
The AI Toolkit supports both the Gemini Developer API (for prototyping) and the
Firebase AI Logic production endpoint. Both require a Firebase project and the
`firebase_core` package to be initialized, as described in the [Get started with
the Gemini API using the Firebase AI Logic SDKs][firebase_ai] docs.

Expand Down Expand Up @@ -134,7 +134,8 @@ The `FirebaseProvider` class exposes the Firebase AI Logic SDK to the
options][options] from which to choose), but you do not provide an API key. All
of that is handled as part of the Firebase project.

For production workloads, it's easy to swap in the Firebase Logic AI endpoint:
For production workloads, it's easy to swap in the Firebase AI Logic production
endpoint:

```dart
class ChatPage extends StatelessWidget {
Expand All @@ -145,7 +146,7 @@ class ChatPage extends StatelessWidget {
appBar: AppBar(title: const Text(App.title)),
body: LlmChatView(
provider: FirebaseProvider(
// Use the Vertex AI endpoint
// Use the production endpoint
model: FirebaseAI.vertexAI().generativeModel(
model: 'gemini-2.5-flash',
),
Expand All @@ -160,7 +161,7 @@ For a complete example, check out the [gemini.dart] and [vertex.dart][]
examples.

[options]:
https://firebase.google.com/docs/vertex-ai/gemini-models#available-model-names
https://firebase.google.com/docs/ai-logic/models
[gemini.dart]:
https://github.com/flutter/ai/blob/main/example/lib/gemini/gemini.dart
[vertex.dart]:
Expand Down Expand Up @@ -215,17 +216,19 @@ attachments, ensure that your app has the necessary permissions:

**firebase_options.dart**

To use the [Vertex AI example app][vertex-ex], place your Firebase configuration
details into the `example/lib/firebase_options.dart` file. You can do this with
the `flutterfire CLI` tool as described in the [Add Firebase to your Flutter
app][add-fb] docs **from within the `example` directory**.
To use the [Firebase AI Logic example app][vertex-ex],
place your Firebase configuration details into the
`example/lib/firebase_options.dart` file.
You can do this with the `flutterfire CLI` tool as described in the
[Add Firebase to your Flutter app][add-fb] docs
**from within the `example` directory**.

:::note Security considerations for `firebase_options.dart`

If your Flutter app calls Gemini or Vertex AI directly from the client, do not
commit `firebase_options.dart` to a public repository. Anyone could reuse your
app configuration to send requests to your AI endpoint, consuming quota and
potentially causing billing costs.
If your Flutter app calls Gemini APIs directly from the client,
do not commit `firebase_options.dart` to a public repository.
Anyone could reuse your app configuration to send requests to your AI endpoint,
consuming quota and potentially causing billing costs.

While this guide shows direct client-side calls for simplicity, for production
apps, you should route AI requests through a backend service (for example [Cloud
Expand Down
5 changes: 3 additions & 2 deletions sites/docs/src/content/ai/genui/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Available providers include the following:

<Tab name="Firebase AI Logic">

To connect to Gemini using the Vertex AI for Firebase SDK, follow these instructions:
To connect to Gemini using the Firebase AI Logic SDK,
follow these instructions:

1. [Create a new Firebase project][] using the Firebase Console.

Expand Down Expand Up @@ -90,7 +91,7 @@ To connect to Gemini using the Vertex AI for Firebase SDK, follow these instruct
}
```

6. Create an instance of the Vertex AI for Firebase generative model and wrap it
6. Create an instance of the Firebase AI Logic generative model and wrap it
with your `SurfaceController` and `A2uiTransportAdapter`:

```dart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ In closing, Li-Te challenged us to go beyond walls of text and chatbots, and ins

### Googlebook and peripheral support

Flutter is already equipped to handle the new Googlebook laptop, powered by Gemini. Because Flutter targets Android’s large-screen guidelines, apps handle external hardware inputs naturally. Trackpad scrolling, mouse hover states, right-click menus, and keyboard shortcuts work by default. Because Flutter has mature desktop support across macOS, Windows, and Linux, Flutter apps will feel native and responsive on a Googlebook rather than looking like stretched mobile ports. Existing mobile apps will feel at home on a Googlebook without requiring an extensive rewrite.
Flutter is already equipped to handle the new Googlebook laptop, built with Gemini. Because Flutter targets Android’s large-screen guidelines, apps handle external hardware inputs naturally. Trackpad scrolling, mouse hover states, right-click menus, and keyboard shortcuts work by default. Because Flutter has mature desktop support across macOS, Windows, and Linux, Flutter apps will feel native and responsive on a Googlebook rather than looking like stretched mobile ports. Existing mobile apps will feel at home on a Googlebook without requiring an extensive rewrite.

**Learn more**: [Introducing Googlebook, designed for Gemini intelligence](https://blog.google/products-and-platforms/platforms/android/meet-googlebook/)

Expand Down
8 changes: 4 additions & 4 deletions sites/www/lib/src/pages/ai_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AiPage extends StatelessComponent {
div(classes: 'media', [
img(
src: context.asset('images/build-with-ai/vertex-tab.png'),
alt: 'Vertex AI Logo',
alt: 'Firebase AI Logic Logo',
),
]),
const div(classes: 'text', [
Expand All @@ -112,7 +112,7 @@ class AiPage extends StatelessComponent {
]),
a(
classes: 'btn',
href: 'https://firebase.google.com/docs/vertex-ai/get-started?platform=flutter',
href: 'https://firebase.google.com/docs/ai-logic/get-started?platform=flutter',
target: Target.blank,
[.text('Get started')],
),
Expand Down Expand Up @@ -183,9 +183,9 @@ class AiPage extends StatelessComponent {
),
),
FeatureGridItem(
title: 'Build generative AI agents with Vertex AI Agent Builder and Flutter',
title: 'Build generative AI agents with Google Cloud and Flutter',
description:
'Supercharge your generative AI development workflow with Vertex AI and Flutter. '
'Supercharge your generative AI development workflow with Gemini Enterprise and Flutter. '
'Seamlessly integrate with your existing tools and leverage our pre-built components and architectures to accelerate prototyping and deploy production-grade gen AI agents in your apps.',
url: 'https://io.google/2024/explore/6f1a4481-7b82-45c9-83eb-caa6e2391152/',
icon: context.asset(
Expand Down
Loading