Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Make input and additionalInput optional in StepRequestBody

hunteraraujoa7c37da713f3
diff --git a/frontend/lib/models/step_request_body.dart b/frontend/lib/models/step_request_body.dart
index 6f8fb7cb16..23e7521fcd 100644
--- a/frontend/lib/models/step_request_body.dart
+++ b/frontend/lib/models/step_request_body.dart
@@ -1,10 +1,13 @@
class StepRequestBody {
- final String input;
+ 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};
}
}