toJson method

Map<String, Object?> toJson()

Converts this tool call to JSON-compatible values.

Implementation

Map<String, Object?> toJson() {
  return {
    'type': 'function',
    'function': {'name': name, 'arguments': arguments},
  };
}