mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
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.
14 lines
341 B
Dart
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};
|
|
}
|
|
}
|