ToolCallDelta.fromJson constructor

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

Implementation

factory ToolCallDelta.fromJson(Map<String, dynamic> json) {
  return ToolCallDelta(
    index: json['index'] as int? ?? 0,
    id: json['id'] as String?,
    type: json['type'] as String?,
    function: json['function'] != null
        ? FunctionCallDelta.fromJson(
            json['function'] as Map<String, dynamic>)
        : null,
  );
}