Skip to content

Commit

Permalink
Merge pull request #114 from Bassiuz/main
Browse files Browse the repository at this point in the history
fix parsing thread response when map is empty
  • Loading branch information
redevrx authored Jun 2, 2024
2 parents 35c6d95 + 4cffc79 commit ad0dd00
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 ad0dd00

Please sign in to comment.