toJson method
Converts this configuration to JSON-compatible values.
Implementation
Map<String, Object?> toJson() {
return {
if (samplerConfig case final samplerConfig?)
'samplerConfig': samplerConfig.toJson(),
if (loraConfig case final loraConfig?) 'loraConfig': loraConfig.toJson(),
'maxOutputTokens': ?maxOutputTokens,
'applyPromptTemplateInSession': ?applyPromptTemplateInSession,
};
}