LlmMessage class

A message in the LLM conversation history.

Constructors

LlmMessage({required LlmRole role, String? content, List<ToolCall>? toolCalls, String? toolCallId, List<LlmImageContent>? images})
const
LlmMessage.assistant(String content)
factory
LlmMessage.assistantToolCalls(List<ToolCall> calls, {String? thought})
factory
LlmMessage.system(String content)
factory
LlmMessage.toolResult(String toolCallId, String content)
factory
LlmMessage.user(String content)
factory
LlmMessage.userMultimodal(String content, List<LlmImageContent> images)
factory

Properties

content String?
Text content (for user/assistant/system messages).
final
hashCode int
The hash code for this object.
no setterinherited
images List<LlmImageContent>?
Optional image attachments for multimodal messages.
final
role LlmRole
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
toolCallId String?
For tool-role messages: the ID of the tool call this responds to.
final
toolCalls List<ToolCall>?
Tool calls returned by the assistant.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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