mockToolCall function

LanguageModelV4ToolCallPart mockToolCall({
  1. required String toolName,
  2. required Object input,
  3. String? toolCallId,
})

Convenience constructor for a mock tool call content part.

Implementation

LanguageModelV4ToolCallPart mockToolCall({
  required String toolName,
  required Object input,
  String? toolCallId,
}) => LanguageModelV4ToolCallPart(
  toolCallId: toolCallId ?? generateId(),
  toolName: toolName,
  input: input,
);