ToolCall.fromJson constructor

ToolCall.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ToolCall.fromJson(Map<String, dynamic> json) {
  return ToolCall(
    id: json['id'] as String? ?? '',
    type: json['type'] as String? ?? 'function',
    function: FunctionCallResult.fromJson(
      json['function'] as Map<String, dynamic>? ?? {},
    ),
  );
}