toJson method
Implementation
@override
Object toJson() => {
'tunedModelSource': ?tunedModelSource?.toJson(),
'baseModel': ?baseModel,
if (name.isNotDefault) 'name': name,
if (displayName.isNotDefault) 'displayName': displayName,
if (description.isNotDefault) 'description': description,
if (temperature case final $1?) 'temperature': encodeDouble($1),
if (topP case final $1?) 'topP': encodeDouble($1),
'topK': ?topK,
if (state.isNotDefault) 'state': state.toJson(),
'createTime': ?createTime?.toJson(),
'updateTime': ?updateTime?.toJson(),
'tuningTask': ?tuningTask?.toJson(),
if (readerProjectNumbers.isNotDefault)
'readerProjectNumbers': [
for (final i in readerProjectNumbers) i.toString(),
],
};