toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'name': name,
  'description': description,
  if (whenToUse != null) 'whenToUse': whenToUse,
  'type': type,
  'source': source,
  if (loadedFrom != null) 'loadedFrom': loadedFrom,
  if (kind != null) 'kind': kind,
  if (context != null) 'context': context,
  if (disableModelInvocation) 'disableModelInvocation': true,
  if (aliases.isNotEmpty) 'aliases': aliases,
  if (model != null) 'model': model,
  if (effort != null) 'effort': effort,
  if (allowedTools != null) 'allowedTools': allowedTools,
  if (pluginInfo != null) 'pluginInfo': pluginInfo!.toJson(),
};