We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dae20f4 commit 72f31e6Copy full SHA for 72f31e6
1 file changed
ai-module/src/main/java/com/nano/ai_module/model/ModelsData.kt
@@ -193,9 +193,9 @@ fun ModelData.Companion.fromJson(jsonString: String): ModelData {
193
mirostatEta = json.optDouble("mirostatEta", 0.1).toFloat(),
194
seed = json.optInt("seed", -1),
195
isImported = json.optBoolean("isImported", false),
196
- modelUrl = json.optString("modelUrl", null),
+ modelUrl = json.optString("modelUrl", "").takeIf { it.isNotEmpty() },
197
isToolCalling = json.optBoolean("isToolCalling", false),
198
systemPrompt = json.optString("systemPrompt", "You are a helpful assistant."),
199
- chatTemplate = json.optString("chatTemplate", null)
+ chatTemplate = json.optString("chatTemplate", "").takeIf { it.isNotEmpty() }
200
)
201
}
0 commit comments