toJson method
Converts to JSON.
Implementation
@override
Map<String, dynamic> toJson() => {
'type': 'function',
'function': {
'name': name,
if (description != null) 'description': description,
if (parameters != null) 'parameters': parameters,
if (strict != null) 'strict': strict,
},
};