mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Implement Artifact Class for Enhanced Data Handling (#5585)
This commit is contained in:
@@ -90,18 +90,10 @@ class _ChatViewState extends State<ChatView> {
|
||||
key: ValueKey(chat.id),
|
||||
chat: chat,
|
||||
onArtifactsButtonPressed: () {
|
||||
// TODO: Create an actual artifact object
|
||||
// Loop through each artifact and download it using the artifact_id
|
||||
for (var artifact in chat.artifacts) {
|
||||
if (artifact is Map) {
|
||||
final artifactMap = artifact.cast<String,
|
||||
dynamic>(); // Cast each item to Map<String, dynamic>
|
||||
|
||||
final artifactId = artifactMap['artifact_id']
|
||||
.toString(); // Get the artifact_id
|
||||
widget.viewModel.downloadArtifact(
|
||||
chat.taskId, artifactId); // Download the artifact
|
||||
}
|
||||
widget.viewModel
|
||||
.downloadArtifact(chat.taskId, artifact.artifactId);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user