[ Edit, Add ] edited and updated docs of edit model directory files code

This commit is contained in:
Anas Fikhi
2023-11-22 03:25:26 +01:00
parent e02a50ffce
commit 8c7e988cd7

View File

@ -11,15 +11,21 @@ export 'sub_models/usage.dart';
/// {@endtemplate}
@immutable
final class OpenAIEditModel {
/// The date the edit was created.
/// The date the edit was [created].
final DateTime created;
/// The choices generated by the edit.
/// The [choices] generated by the edit.
final List<OpenAIEditModelChoice> choices;
/// The usage of the edit, if any.
/// The [usage] of the edit, if any.
final OpenAIEditModelUsage? usage;
/// Weither the edit have at least one choice in [choices].
bool get haveChoices => choices.isNotEmpty;
/// Weither the edit have a usage information.
bool get haveUsage => usage != null;
@override
int get hashCode => created.hashCode ^ choices.hashCode ^ usage.hashCode;