toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      if (id != null) 'id': id,
      if (object != null) 'object': object,
      if (model != null) 'model': model?.toJson(),
      if (instructions != null) 'instructions': instructions,
      'tools': tools?.map((t) => t.toJson()).toList(),
      if (toolChoice != null) 'tool_choice': toolChoice!.toJson(),
      if (temperature != null) 'temperature': temperature,
      if (tracing != null) 'tracing': tracing?.toJson(),
    };