Skip to content

Commit

Permalink
fix parsing thread response when map is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Bassiuz committed May 31, 2024
1 parent 35c6d95 commit 4cffc79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/model/thread/response/thread_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ThreadResponse {
createdAt: json["created_at"] ?? 0,
id: json["id"] ?? '',
object: json["object"] ?? '',
toolResources: json['tool_resources']);
toolResources: json['tool_resources'] is Map<String, double> ? json['tool_resources'] : null);

Map<String, dynamic> toJson() => {
"metadata": metadata,
Expand Down

0 comments on commit 4cffc79

Please sign in to comment.