Skip to content
Closed
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
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ Horváth István <horvatska01@gmail.com>
Liu Zhisong <liuzs0666@gmail.com>
Ievgenii Kovtun <jeka.ns@gmail.com>
Dinu-Stefan Rusu <rusudinustefan@gmail.com>
Vansh Vashisht <vanshvashisht23@gmail.com>
27 changes: 26 additions & 1 deletion packages/firebase_ai/firebase_ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@ To get started with Firebase AI Logic Flutter, please [see the documentation](ht

To start use this plugin, please visit the [Text only prompt documentation](https://firebase.google.com/docs/ai-logic/generate-text?platform=flutter)

## App Check Integration

If your app uses [Firebase App Check](https://firebase.google.com/docs/app-check), you can pass
the `AppCheck` instance directly to `FirebaseAI` to protect your Gemini API calls from unauthorized clients.

Add `firebase_app_check` to your `pubspec.yaml`:

```yaml
dependencies:
firebase_app_check: latest_version
```

Then initialize `FirebaseAI` with App Check:

```dart
import 'package:firebase_ai/firebase_ai.dart';
import 'package:firebase_app_check/firebase_app_check.dart';

final model = FirebaseAI.instanceFor(
appCheck: FirebaseAppCheck.instance,
).generativeModel(model: 'gemini-2.0-flash');
```

For more details, see the [App Check documentation](https://firebase.google.com/docs/app-check).

## Issues and feedback

Please file FlutterFire specific issues, bugs, or feature requests in our [issue tracker](https://github.com/firebase/flutterfire/issues/new).
Expand All @@ -23,4 +48,4 @@ Plugin issues that are not specific to FlutterFire can be filed in the [Flutter

To contribute a change to this plugin,
please review our [contribution guide](https://github.com/firebase/flutterfire/blob/main/CONTRIBUTING.md)
and open a [pull request](https://github.com/firebase/flutterfire/pulls).
and open a [pull request](https://github.com/firebase/flutterfire/pulls).
Loading