toJson method
Implementation
Map<String, dynamic> toJson() {
return {
if (model != null) 'model': model,
if (name != null) 'name': name,
if (description != null) 'description': description,
if (instructions != null) 'instructions': instructions,
if (tools != null) 'tools': tools!.map((tool) => tool.toJson()).toList(),
if (toolResources != null) 'tool_resources': toolResources!.toJson(),
if (metadata != null) 'metadata': metadata,
if (temperature != null) 'temperature': temperature,
if (topP != null) 'top_p': topP,
if (responseFormat != null) 'response_format': responseFormat!.toJson(),
};
}