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
4 changes: 4 additions & 0 deletions packages/genai_primitives/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
12 changes: 12 additions & 0 deletions packages/genai_primitives/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +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.

## Core Types

* [`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): A collection of `Part` instances with utility methods.

* [`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): 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): Defines a tool that can be invoked by an LLM.

## Aliasing

If you need to resolve name conflicts with other packages, alias the package as `genai`:
Expand Down
2 changes: 1 addition & 1 deletion packages/genai_primitives/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading