TunedModel.fromJson constructor
TunedModel.fromJson(
- Map<String, dynamic> json
)
Implementation
factory TunedModel.fromJson(Map<String, dynamic> json) {
return TunedModel(
tunedModelSource: decode(
json['tunedModelSource'],
TunedModelSource.fromJson,
),
baseModel: json['baseModel'],
name: json['name'] ?? '',
displayName: json['displayName'] ?? '',
description: json['description'] ?? '',
temperature: decodeDouble(json['temperature']),
topP: decodeDouble(json['topP']),
topK: json['topK'],
state:
decodeEnum(json['state'], TunedModel_State.fromJson) ??
TunedModel_State.$default,
createTime: decodeCustom(json['createTime'], Timestamp.fromJson),
updateTime: decodeCustom(json['updateTime'], Timestamp.fromJson),
tuningTask: decode(json['tuningTask'], TuningTask.fromJson),
readerProjectNumbers: decodeList(json['readerProjectNumbers']) ?? [],
);
}