toJson method
Implementation
@override
Map<String, dynamic> toJson() => {
'type': 'tool_result',
'tool_call_id': toolCallId,
'result': result,
if (toolName != null) 'tool_name': toolName,
if (isError != null) 'is_error': isError,
if (preliminary != null) 'preliminary': preliminary,
if (isDynamic != null) 'dynamic': isDynamic,
if (providerOptions != null) 'provider_options': providerOptions,
};