AIMessage.toolResult constructor

AIMessage.toolResult(
  1. String toolCallId,
  2. String content
)

Creates a tool result message.

Implementation

factory AIMessage.toolResult(String toolCallId, String content) {
  return AIMessage(
    role: AIRole.tool,
    content: content,
    toolCallId: toolCallId,
  );
}