You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[genui](packages/genui/)| The core framework to employ Generative UI. |
90
-
|[genui_firebase_ai](packages/genui_firebase_ai/)| Provides **`FirebaseAiContentGenerator`** to connect to Gemini via Firebase AI Logic. This is the recommended approach for production apps based on client-side agents. |
91
-
|[genui_google_generative_ai](packages/genui_google_generative_ai/)| Provides **`GoogleGenerativeAiContentGenerator`** for connecting to the Google Generative AI API with only an API key. Ideal for getting started quickly. |
92
-
|[genui_a2ui](packages/genui_a2ui/)| Provides **`A2uiContentGenerator`** for connecting to any server that implements the [A2UI protocol](https://a2ui.org). Use this for integrating with custom agent backends. |
93
-
|[json_schema_builder](packages/json_schema_builder/)| A fully featured Dart JSON Schema package with validation, used by the core framework to define widget data structures. |
94
-
95
-
## Getting Started
87
+
| Package | Description | Version |
88
+
| :--- | :--- | :--- |
89
+
|[genui](packages/genui/)| The core framework to employ Generative UI. |[](https://pub.dev/packages/genui)|
90
+
|[genui_firebase_ai](packages/genui_firebase_ai/)| Provides **`FirebaseAiContentGenerator`** to connect to Gemini via Firebase AI Logic. This is the recommended approach for production apps based on client-side agents. |[](https://pub.dev/packages/genui_firebase_ai)|
91
+
|[genui_google_generative_ai](packages/genui_google_generative_ai/)| Provides **`GoogleGenerativeAiContentGenerator`** for connecting to the Google Generative AI API with only an API key. Ideal for getting started quickly. |[](https://pub.dev/packages/genui_google_generative_ai)|
92
+
|[genui_a2ui](packages/genui_a2ui/)| Provides **`A2uiContentGenerator`** for connecting to any server that implements the [A2UI protocol](https://a2ui.org). Use this for integrating with custom agent backends. |[](https://pub.dev/packages/genui_a2ui)|
93
+
|[json_schema_builder](packages/json_schema_builder/)| A fully featured Dart JSON Schema package with validation, used by the core framework to define widget data structures. |[](https://pub.dev/packages/json_schema_builder)|
94
+
95
+
### Dependencies
96
+
97
+
This diagram shows how packages depend on each other and how examples use them.
Copy file name to clipboardExpand all lines: examples/simple_chat/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The application's logic is contained almost entirely within `lib/main.dart`.
32
32
5.**UI Rendering**:
33
33
-`GenUiConversation` listens to the stream and processes the `A2uiMessage`s, invoking the appropriate callbacks like `onSurfaceAdded`.
34
34
- The `_handleSurfaceAdded` callback adds a new message item to the list, containing the `surfaceId`.
35
-
- The `ListView` rebuilds, and a `GenUiSurface` widget is rendered for the AI's message, dynamically building the UI based on the `UiDefinition` managed by `GenUiManager`.
35
+
- The `ListView` rebuilds, and a `GenUiSurface` widget is rendered for the AI's message, dynamically building the UI based on the `UiDefinition` managed by `A2uiMessageProcessor`.
'''Gemini API key is required when using google backend. Run the app with a GEMINI_API_KEY as a Dart environment variable, for example by running with -D GEMINI_API_KEY=\$GEMINI_API_KEY or set the GEMINI_API_KEY environment variable in your shell environment.''',
'''Gemini API key is required when using google backend. Run the app with a GEMINI_API_KEY as a Dart environment variable. You can do this by running with -D GEMINI_API_KEY=\$GEMINI_API_KEY''',
Copy file name to clipboardExpand all lines: examples/travel_app/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ This example highlights several core concepts of the `genui` package:
23
23
-**Dynamic UI Generation**: The entire user interface is constructed on-the-fly by the AI based on the conversation.
24
24
-**Component Catalog**: The AI builds the UI from a custom, domain-specific catalog of widgets defined in `lib/src/catalog.dart`. This includes widgets like `TravelCarousel`, `ItineraryEntry`, and `OptionsFilterChipInput`.
25
25
-**System Prompt Engineering**: The behavior of the AI is guided by a detailed system prompt located in `lib/src/travel_planner_page.dart`. This prompt instructs the AI on how to act like a travel agent and which widgets to use in various scenarios.
26
-
-**Dynamic UI State Management**: The `GenUiConversation` and `GenUiManager` from `genui` handle the orchestration of AI interaction, state of the dynamically generated UI surfaces, and event processing.
26
+
-**Dynamic UI State Management**: The `GenUiConversation` and `A2uiMessageProcessor` from `genui` handle the orchestration of AI interaction, state of the dynamically generated UI surfaces, and event processing.
27
27
-**Multiple AI Backends**: The app supports switching between **Google Generative AI** (direct API) and **Firebase Vertex AI**. This is configured in `lib/src/config/configuration.dart`.
28
28
-**Tool Use**: The AI uses tools like `ListHotelsTool` to fetch real-world data (mocked in this example) and present it to the user.
29
29
-**Widget Catalog**: A dedicated tab allows developers to inspect all available widgets in the catalog, facilitating development and debugging.
0 commit comments