Skip to content
Open
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
11 changes: 5 additions & 6 deletions packages/genui/.guides/docs/create_a_custom_catalogitem.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ description: |
Follow these steps to create your own, custom widgets and make them available
to the agent for generation.

## 1. Import `json_schema_builder`
## 1. Depend on `json_schema_builder`

Add the `json_schema_builder` package as a dependency in `pubspec.yaml`. Use the
same commit reference as the one for `genui`.
Use `dart pub add` to add `json_schema_builder` as a dependency in
your `pubspec.yaml` file:

```yaml
dependencies:
json_schema_builder: ^0.1.3
```bash
dart pub add json_schema_builder
```

## 2. Create the new widget's schema
Expand Down
33 changes: 13 additions & 20 deletions packages/genui/.guides/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,11 @@ Logic, follow these instructions:
[Firebase's Flutter Setup guide](https://firebase.google.com/docs/flutter/setup)
to add Firebase to your app. Run `flutterfire configure` to configure your
app.
4. In `pubspec.yaml`, add `genui` and `genui_firebase_ai` to the
`dependencies` section. As of this writing, it's best to use pub's git
dependency to refer directly to this project's source.

```yaml
dependencies:
genui: ^0.5.1
genui_firebase_ai: ^0.5.1
4. Use `dart pub add` to add the `genui` and `genui_firebase_ai` packages as
dependencies in your `pubspec.yaml` file:

```bash
dart pub add genui genui_firebase_ai
```

5. In your app's `main` method, ensure that the widget bindings are initialized,
Expand All @@ -66,13 +63,11 @@ Logic, follow these instructions:
To use `genui` with a generic agent provider that supports the A2UI protocol,
use the `genui_a2ui` package.

1. In `pubspec.yaml`, add `genui` and `genui_a2ui` to the `dependencies`
section.
1. Use `dart pub add` to add the `genui` and `genui_a2ui` packages as
dependencies in your `pubspec.yaml` file:

```yaml
dependencies:
genui: ^0.5.1
genui_a2ui: ^0.5.1
```bash
dart pub add genui genui_a2ui
```

2. Use the `A2uiContentGenerator` to connect to your agent provider.
Expand All @@ -82,13 +77,11 @@ use the `genui_a2ui` package.
To use `genui` with the Google Generative AI API, use the
`genui_google_generative_ai` package.

1. In `pubspec.yaml`, add `genui` and `genui_google_generative_ai` to the
`dependencies` section.
1. Use `dart pub add` to add the `genui` and `genui_google_generative_ai` packages as
dependencies in your `pubspec.yaml` file:

```yaml
dependencies:
genui: ^0.5.1
genui_google_generative_ai: ^0.5.1
```bash
dart pub add genui genui_google_generative_ai
```

2. Use the `GoogleGenerativeAiContentGenerator` to connect to the Google
Expand Down
29 changes: 10 additions & 19 deletions packages/genui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,11 @@ Logic, follow these instructions:
3. Follow the first three steps in
[Firebase's Flutter Setup guide](https://firebase.google.com/docs/flutter/setup)
to add Firebase to your app.
4. In `pubspec.yaml`, add `genui` and `genui_firebase_ai` to the
`dependencies` section.

```yaml
dependencies:
# ...
genui: 0.5.0
genui_firebase_ai: 0.5.0
4. Use `dart pub add` to add the `genui` and `genui_firebase_ai` packages as
dependencies in your `pubspec.yaml` file:

```bash
dart pub add genui genui_firebase_ai
```

5. In your app's `main` method, ensure that the widget bindings are initialized,
Expand Down Expand Up @@ -298,19 +295,13 @@ In addition to using the catalog of widgets in `CoreCatalogItems`, you can
create custom widgets for the agent to generate. Use the following
instructions.

#### Import `json_schema_builder`

Add the `json_schema_builder` package as a dependency in `pubspec.yaml`. Use the
same commit reference as the one for `genui`.
#### Depend on the `json_schema_builder` package

```yaml
dependencies:
# ...
json_schema_builder:
git:
url: https://github.com/flutter/genui.git
path: packages/json_schema_builder
Use `dart pub add` to add `json_schema_builder` as a dependency in
your `pubspec.yaml` file:

```bash
dart pub add json_schema_builder
```

#### Create the new widget's schema
Expand Down
15 changes: 5 additions & 10 deletions packages/genui_a2ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ An integration package for [`genui`](https://pub.dev/packages/genui) and the [A2

### Installation

Add the following to your `pubspec.yaml`:

```yaml
dependencies:
flutter:
sdk: flutter
genui: ^0.6.0 # Or the latest version
genui_a2ui: ^0.6.0 # Or the latest version
```
Use `dart pub add` to add the latest versions of `genui` and `genui_a2ui` as
dependencies in your `pubspec.yaml` file:

Then run `flutter pub get`.
```bash
dart pub add genui genui_a2ui
```

### Basic Usage

Expand Down
7 changes: 6 additions & 1 deletion packages/genui_google_generative_ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ To use this package, you will need a Gemini API key. If you don't already have o

### Installation

Add this package to your `pubspec.yaml`: "genui_google_generative_ai"
Use `dart pub add` to add the latest versions of `genui` and `genui_google_generative_ai` as
dependencies in your `pubspec.yaml` file:

```bash
dart pub add genui genui_google_generative_ai
```

### Usage

Expand Down
Loading