From dd4e4a66cbe1c0db3a991c9c47200fdb5376fe7d Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Mon, 2 Feb 2026 16:18:31 -0800 Subject: [PATCH 1/4] Update README.md --- packages/genai_primitives/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/genai_primitives/README.md b/packages/genai_primitives/README.md index a2741b292..98161459e 100644 --- a/packages/genai_primitives/README.md +++ b/packages/genai_primitives/README.md @@ -4,6 +4,11 @@ This package provides a set of technology-agnostic primitive types and data stru It includes core definitions such as `ChatMessage`, `Parts`, `ToolDefinition` and other foundational classes that are used across the `genai` ecosystem to ensure consistency and interoperability between different AI providers. +## Standartization and flexibility + + + + ## Aliasing If you need to resolve name conflicts with other packages, alias the package as `genai`: From df19f1face142c5897ee91db812728b4ee4485ce Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Mon, 2 Feb 2026 16:47:38 -0800 Subject: [PATCH 2/4] Update README.md --- packages/genai_primitives/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/genai_primitives/README.md b/packages/genai_primitives/README.md index 98161459e..73fa500fe 100644 --- a/packages/genai_primitives/README.md +++ b/packages/genai_primitives/README.md @@ -4,10 +4,18 @@ This package provides a set of technology-agnostic primitive types and data stru It includes core definitions such as `ChatMessage`, `Parts`, `ToolDefinition` and other foundational classes that are used across the `genai` ecosystem to ensure consistency and interoperability between different AI providers. -## Standartization and flexibility +## Core Types +* [`Part`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/model.dart): Flexible base type for message parts. To define custom parts of message derive from this type. +* [`Parts`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/parts.dart): collection of instances of `Part` with helpers. +* [`StandardPart` (extends `Part`)](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/standard_part.dart): sealed class with fixed set of implementations, utilized by `ChatMessage`. +To reach consistency with other packages and LLM providers, use StandardPart. + +* [ChatMessage](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/chat_message.dart): class that represent chat message compatible with most gen AI model and framework providers. + +* [ToolDefinition](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/tool_definition.dart): definition of a tool that can be called by LLM. ## Aliasing From 9de812884422e68837c0c93526daaa134fa3c29e Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Mon, 2 Feb 2026 16:55:47 -0800 Subject: [PATCH 3/4] Update README.md --- packages/genai_primitives/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/genai_primitives/README.md b/packages/genai_primitives/README.md index 73fa500fe..6a6672c71 100644 --- a/packages/genai_primitives/README.md +++ b/packages/genai_primitives/README.md @@ -6,16 +6,15 @@ It includes core definitions such as `ChatMessage`, `Parts`, `ToolDefinition` an ## Core Types -* [`Part`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/model.dart): Flexible base type for message parts. To define custom parts of message derive from this type. +* [`Part`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/model.dart): Base type for message parts. Extend this to define custom part types. -* [`Parts`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/parts.dart): collection of instances of `Part` with helpers. +* [`Parts`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/parts.dart): A collection of `Part` instances with utility methods. -* [`StandardPart` (extends `Part`)](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/standard_part.dart): sealed class with fixed set of implementations, utilized by `ChatMessage`. -To reach consistency with other packages and LLM providers, use StandardPart. +* [`StandardPart`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/parts/standard_part.dart): Sealed class extending `Part` with a fixed set of implementations. Used by `ChatMessage` for cross-provider compatibility. -* [ChatMessage](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/chat_message.dart): class that represent chat message compatible with most gen AI model and framework providers. +* [`ChatMessage`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/chat_message.dart): Represents a chat message compatible with most GenAI providers. -* [ToolDefinition](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/tool_definition.dart): definition of a tool that can be called by LLM. +* [`ToolDefinition`](https://github.com/flutter/genui/blob/main/packages/genai_primitives/lib/src/tool_definition.dart): Defines a tool that can be invoked by an LLM. ## Aliasing From 78cd0fa18af7ce0651a47eb4cbf3a55dbdf3f256 Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Mon, 2 Feb 2026 16:58:22 -0800 Subject: [PATCH 4/4] - --- packages/genai_primitives/CHANGELOG.md | 4 ++++ packages/genai_primitives/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/genai_primitives/CHANGELOG.md b/packages/genai_primitives/CHANGELOG.md index 970750892..efcb563aa 100644 --- a/packages/genai_primitives/CHANGELOG.md +++ b/packages/genai_primitives/CHANGELOG.md @@ -1,5 +1,9 @@ # `genai_primitives` Changelog +## 0.2.1 + +- Update README.md (#693). + ## 0.2.0 - **BREAKING**: Rename Part to StandardPart and BasePart to Part (#683). diff --git a/packages/genai_primitives/pubspec.yaml b/packages/genai_primitives/pubspec.yaml index be1581148..b55cb7cd0 100644 --- a/packages/genai_primitives/pubspec.yaml +++ b/packages/genai_primitives/pubspec.yaml @@ -4,7 +4,7 @@ name: genai_primitives description: A set of primitives for working with generative AI. -version: 0.2.0 +version: 0.2.1 homepage: https://github.com/flutter/genui/tree/main/packages/genai_primitives license: BSD-3-Clause issue_tracker: https://github.com/flutter/genui/issues