mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-27 19:04:25 +01:00
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.
11 lines
265 B
Dart
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};
|
|
}
|
|
}
|