ToolChatMessage class

Type of message that is the response of calling a tool.

Inheritance
Annotations
  • @immutable

Constructors

ToolChatMessage({required String toolCallId, required String content, String? name})
Type of message that is the response of calling a tool.
const
ToolChatMessage.fromMap(Map<String, dynamic> map)
Converts a map to a ToolChatMessage.
factory

Properties

content → String
The response of the tool call.
final
contentAsString → String
Returns to content of the message as a string.
no setterinherited
hashCode → int
The hash code for this object.
no setteroverride
name → String?
The name of the tool that produced this response, when known.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
toolCallId → String
The id of the tool that was called.
final

Methods

concat(ChatMessage other) → ToolChatMessage
Merges this message with another by concatenating the content.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
Converts this ChatMessage to a map along with a type hint for deserialization.
override
toString() → String
A string representation of this object.
override

Operators

operator ==(covariant ToolChatMessage other) → bool
The equality operator.
override

Constants

defaultPrefix → const String
Default prefix for ToolChatMessage.