groqToolCallFromJson static method

GroqToolCall groqToolCallFromJson(
  1. Map<String, dynamic> json
)

Implementation

static GroqToolCall groqToolCallFromJson(Map<String, dynamic> json) {
  print(json.toString());
  return GroqToolCall(
    callId: json['id'] as String,
    // role: GroqMessageRoleParser.tryParse(json['role'] as String) ??
    //     GroqMessageRole.user,
    functionName: json['function']['name'] as String,
    arguments: jsonDecode(json['function']['arguments']),
  );
}