Files
Auto-GPT/lib/models/step_request_body.dart
hunteraraujo c4d08aefb9 Implement and Test StepRequestBody Model
This commit introduces the StepRequestBody class, designed to encapsulate the request body for sending a chat message in the form of a step. The class includes a toJson method for easy serialization to JSON format.

Additionally, unit tests have been added to ensure that the StepRequestBody object is created with the correct values and that it serializes to the expected JSON format.

- Added StepRequestBody class with input and optional additionalInput fields.
- Implemented toJson method for converting an instance of the class to JSON.
- Added unit tests to verify both object creation and JSON serialization.

These changes provide a robust way to manage the request body for step-based chat messages.
2023-08-31 14:36:35 -07:00

11 lines
265 B
Dart

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