MCPcopy Create free account
hub / github.com/Roy3838/Observer / unloadLocalModel

Method unloadLocalModel

app/src/utils/ModelManager.ts:571–577  ·  view source on GitHub ↗

* Unload the currently loaded local model for a given server type.

(server: string)

Source from the content-addressed store, hash-verified

569 * Unload the currently loaded local model for a given server type.
570 */
571 public async unloadLocalModel(server: string): Promise<void> {
572 if (server === ModelManager.BROWSER_LOCAL) {
573 GemmaModelManager.getInstance().unloadModel();
574 } else if (server === ModelManager.LLAMA_CPP_LOCAL && isTauri()) {
575 await NativeLlmManager.getInstance().unloadModel();
576 }
577 }
578
579 /**
580 * Check if a local model is ready for inference.

Callers 1

handleCancelLoadFunction · 0.80

Calls 3

isTauriFunction · 0.90
unloadModelMethod · 0.65
getInstanceMethod · 0.45

Tested by

no test coverage detected