VanturaMessage class

Represents a formal message in the Vantura ecosystem.

Replaces raw Maps for improved type safety and high-performance serialization across Isolate boundaries and to Vantura Cloud.

Constructors

VanturaMessage({required MessageRole role, String? content, List<Map<String, dynamic>>? toolCalls, String? toolCallId, bool isSummary = false, DateTime? timestamp, Map<String, dynamic>? metadata})
Creates a VanturaMessage with the specified properties.
VanturaMessage.fromMap(Map<String, dynamic> map)
Creates a VanturaMessage from a standardized JSON map.
factory

Properties

content String?
The text content of the message.
final
hashCode int
The hash code for this object.
no setterinherited
isSummary bool
Whether this message is an LLM-generated summary of previous history.
final
metadata Map<String, dynamic>?
Metadata for observability or project-specific categorization.
final
role MessageRole
The role of the message creator.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
Exact time the message was created.
final
toolCallId String?
The ID of the tool call this message responds to (only for MessageRole.tool).
final
toolCalls List<Map<String, dynamic>>?
Tool calls requested by the assistant (only for MessageRole.assistant).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toLlmFormat() Map<String, dynamic>
Compatibility helper to convert to OpenAI-compliant format.
toMap() Map<String, dynamic>
Converts the message to a standardized JSON map for Isolate/Cloud transfer.
toString() String
A string representation of this object.
override

Operators

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