Model class

Describes an OpenAI model offering that can be used with the API.

Annotations
  • @freezed

Constructors

Model({required String id, required int created, required ModelObject object, @JsonKey.new(name: 'owned_by') required String ownedBy})
Factory constructor for Model
const
factory
Model.fromJson(Map<String, dynamic> json)
Object construction from a JSON representation
factory

Properties

copyWith → $ModelCopyWith<Model>
Create a copy of Model with the given fields replaced by the non-null parameter values.
no setterinherited
created int
The Unix timestamp (in seconds) when the model was created.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
The model identifier, which can be referenced in the API endpoints.
no setterinherited
object ModelObject
The object type, which is always "model".
no setterinherited
ownedBy String
The organization that owns the model.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Model to a JSON map.
inherited
toMap() Map<String, dynamic>
Map representation of object (not serialized)
toString() String
A string representation of this object.
inherited
validateSchema() String?
Perform validations on the schema property values

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

propertyNames → const List<String>
List of all property names of schema