Skip to content

Commit 6ffdd4a

Browse files
committed
Fix CI: remove onCleared (close() not in published AAR) and revert temperature
- Remove onCleared() override — LlmModule.close() was added in the Kotlin conversion (#19211) but the published Maven AAR still ships the old Java version without it - Revert DEFAULT_TEMPERATURE to 0.0 — users can set temperature via the UI settings; no need to change the default Authored with Claude.
1 parent e5a8645 commit 6ffdd4a

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/ModuleSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ data class ModuleSettings(
153153
}
154154

155155
companion object {
156-
const val DEFAULT_TEMPERATURE = 0.6
156+
const val DEFAULT_TEMPERATURE = 0.0
157157
val DEFAULT_MODEL = ModelType.LLAMA_3
158158
val DEFAULT_BACKEND = BackendType.XNNPACK
159159
}

llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/ui/viewmodel/ChatViewModel.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ class ChatViewModel(application: Application) : AndroidViewModel(application), L
9696
private val executor: Executor = Executors.newSingleThreadExecutor()
9797
private val contentResolver = application.contentResolver
9898

99-
override fun onCleared() {
100-
super.onCleared()
101-
module?.close()
102-
loadedModules.forEach { (_, m) -> m.close() }
103-
loadedModules.clear()
104-
}
105-
10699
init {
107100
// Check for clear chat history flag BEFORE loading saved messages
108101
val moduleSettings = demoSharedPreferences.getModuleSettings()

0 commit comments

Comments
 (0)