Files
Auto-GPT/frontend/lib/models/step_request_body.dart
hunteraraujo a7c37da713 Make input and additionalInput optional in StepRequestBody
Updated the StepRequestBody class to allow both 'input' and 'additionalInput' to be optional. Added logic in toJson() method to return an empty JSON object if both fields are null.
2023-09-06 11:41:23 -07:00

14 lines
341 B
Dart

class StepRequestBody {
final String? input;
final Map<String, dynamic>? additionalInput;
StepRequestBody({required this.input, this.additionalInput});
Map<String, dynamic> toJson() {
if (input == null && additionalInput == null) {
return {};
}
return {'input': input, 'additional_input': additionalInput};
}
}