ToolCall.fromJson constructor

ToolCall.fromJson(
  1. Object? j
)

Implementation

factory ToolCall.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ToolCall(
    toolName: switch (json['toolName']) {
      null => null,
      Object $1 => decodeString($1),
    },
    toolInput: switch (json['toolInput']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}