toJson method
Implementation
@override
Object toJson() => {
'name': name,
'baseModelId': baseModelId,
'version': version,
if (displayName.isNotDefault) 'displayName': displayName,
if (description.isNotDefault) 'description': description,
if (inputTokenLimit.isNotDefault) 'inputTokenLimit': inputTokenLimit,
if (outputTokenLimit.isNotDefault) 'outputTokenLimit': outputTokenLimit,
if (supportedGenerationMethods.isNotDefault)
'supportedGenerationMethods': supportedGenerationMethods,
if (temperature != null) 'temperature': encodeDouble(temperature),
if (maxTemperature != null) 'maxTemperature': encodeDouble(maxTemperature),
if (topP != null) 'topP': encodeDouble(topP),
if (topK != null) 'topK': topK,
if (thinking.isNotDefault) 'thinking': thinking,
};