RichMessage class

The primary data model for advanced AI interactions.

RichMessage is a multi-modal container that tracks the complete lifecycle of a message, including internal AI reasoning, tool execution results, source citations, and interactive UI elements.

Constructors

RichMessage({String? id, String? key, String? from, List<MessageVersionType>? versions, List<ToolCallType>? tools, List<SourceType>? sources, ReasoningType? reasoning, ChainOfThoughtType? chainOfThought, PlanType? plan, ContextDataType? contextData, ConfirmationType? confirmation, List<CheckpointType>? checkpoints, List<SuggestionType>? suggestions, List<TaskType>? tasks, List<SimpleMessageType>? messageQueue, String? conversationId, String? sessionId, DateTime? createdAt, DateTime? updatedAt})
RichMessage.fromJson(Map<String, dynamic> json)
Factory constructor to create a RichMessage from a JSON map.
factory

Properties

chainOfThought ChainOfThoughtType?
Detailed "Chain of Thought" steps, providing transparency into the AI's logic.
getter/setter pair
checkpoints List<CheckpointType>?
Markers used for conversation synchronization or history management.
getter/setter pair
confirmation ConfirmationType?
State data for actions requiring explicit user confirmation (e.g., sensitive tool calls).
getter/setter pair
contextData ContextDataType?
Technical metadata including token usage stats and the specific model used.
getter/setter pair
conversationId String?
The unique ID of the conversation thread this message belongs to.
getter/setter pair
createdAt DateTime?
Timestamp of when the message was first created.
getter/setter pair
from String?
The author of the message: "user" or "assistant".
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id String?
Unique identifier for the message.
getter/setter pair
key String?
A secondary unique key, often used for client-side optimistic updates before a server id is assigned.
getter/setter pair
messageQueue List<SimpleMessageType>?
A queue of messages if the server response is delivered in discrete parts.
getter/setter pair
plan PlanType?
The structured logical steps the AI planned to take to fulfill the request.
getter/setter pair
reasoning ReasoningType?
High-level reasoning or a natural language summary of the model's thought process.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionId String?
The specific session identifier. Maps to session_id in the backend.
getter/setter pair
sources List<SourceType>?
Citations or links to external data sources used to generate the response.
getter/setter pair
suggestions List<SuggestionType>?
Quick-reply strings suggested for the user's next turn.
getter/setter pair
tasks List<TaskType>?
Atomic task items or "To-Dos" extracted from the conversation flow.
getter/setter pair
tools List<ToolCallType>?
Records of any tools or functions the AI called or intends to call.
getter/setter pair
updatedAt DateTime?
Timestamp of the last time this message or its metadata was modified.
getter/setter pair
versions List<MessageVersionType>?
Keeps track of different versions or edits of the same message.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the RichMessage instance to a JSON-compatible map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited