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.

Extend Task Model to Include Serialization

hunteraraujoe446d723ee01
diff --git a/frontend/lib/models/task.dart b/frontend/lib/models/task.dart
index 056ed46831..a7325f7de0 100644
--- a/frontend/lib/models/task.dart
+++ b/frontend/lib/models/task.dart
@@ -45,13 +45,19 @@ class Task {
);
}
+ Map<String, dynamic> toJson() {
+ return {
+ 'task_id': id,
+ 'input': title,
+ 'additional_input': additionalInput,
+ 'artifacts': artifacts,
+ };
+ }
+
@override
bool operator ==(Object other) =>
identical(this, other) ||
- other is Task &&
- runtimeType == other.runtimeType &&
- id == other.id &&
- title == other.title;
+ other is Task && runtimeType == other.runtimeType && id == other.id;
@override
int get hashCode => id.hashCode ^ title.hashCode;