We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openai_dart: 0.4.4
Following code in the package throws error:
_$ListAssistantsResponseImpl _$$ListAssistantsResponseImplFromJson( Map<String, dynamic> json) => _$ListAssistantsResponseImpl( object: json['object'] as String, data: (json['data'] as List<dynamic>) .map((e) => AssistantObject.fromJson(e as Map<String, dynamic>)) .toList(), firstId: json['first_id'] as String, lastId: json['last_id'] as String, hasMore: json['has_more'] as bool, );
Error reason: When list is empty, the first_id and last_id are null:
first_id
last_id
Solution: Change String to String?.
String
String?
Should not throw error when parsing json response.
The text was updated successfully, but these errors were encountered:
hey @akshdeep-singh ,
Thanks for reporting, I'll make it nullable in the next release.
Sorry, something went wrong.
Fixed in openai_dart 0.4.5
davidmigloz
Successfully merging a pull request may close this issue.
System Info
openai_dart: 0.4.4
Related Components
Reproduction
Following code in the package throws error:
Error reason: When list is empty, the
first_id
andlast_id
are null:Solution: Change
String
toString?
.Expected behavior
Should not throw error when parsing json response.
The text was updated successfully, but these errors were encountered: