File tree Expand file tree Collapse file tree
ai-module/src/main/java/com/nano/ai_module/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ data class ModelData(
4848 // Prompt configuration
4949 var systemPrompt : String = " You are a helpful assistant." ,
5050 var chatTemplate : String? = null
51- )
51+ ) {
52+ companion object
53+ }
5254
5355
5456@Serializable
@@ -164,9 +166,6 @@ fun ModelData.getFormattedSize(): String? {
164166 }
165167}
166168
167- // Required companion object for fromJson extension
168- fun ModelData.create () = ModelData ()
169-
170169/* *
171170 * Creates ModelData from JSON string for deserialization.
172171 */
@@ -199,8 +198,4 @@ fun ModelData.Companion.fromJson(jsonString: String): ModelData {
199198 systemPrompt = json.optString(" systemPrompt" , " You are a helpful assistant." ),
200199 chatTemplate = json.optString(" chatTemplate" , null )
201200 )
202- }
203-
204- // Companion object for ModelData
205- val ModelData .Companion : ModelDataCompanion get() = ModelDataCompanion
206- object ModelDataCompanion
201+ }
You can’t perform that action at this time.
0 commit comments