concat method

  1. @override
ToolChatMessage concat(
  1. ChatMessage other
)
override

Merges this message with another by concatenating the content.

Implementation

@override
ToolChatMessage concat(final ChatMessage other) {
  if (other is! ToolChatMessage) {
    return this;
  }

  return ToolChatMessage(
    toolCallId: toolCallId,
    content: content + other.content,
  );
}