toMap method
Convert GenerativeModel to Map
Implementation
Map<String, dynamic> toMap() {
return {
"modelName": modelName,
"apiKey": apiKey,
"temperature": generationConfig?.temperature?.toString(),
"topK": generationConfig?.topK,
"topP": generationConfig?.topP?.toString(),
"candidateCount": generationConfig?.candidateCount,
"maxOutputTokens": generationConfig?.maxOutputTokens,
"stopSequences": generationConfig?.stopSequences,
"safetySettings": _getSafetySettings(),
};
}