* Unload the currently loaded local model for a given server type.
(server: string)
| 539 | * Unload the currently loaded local model for a given server type. |
| 540 | */ |
| 541 | public async unloadLocalModel(server: string): Promise<void> { |
| 542 | if (server === ModelManager.BROWSER_LOCAL) { |
| 543 | GemmaModelManager.getInstance().unloadModel(); |
| 544 | } else if (server === ModelManager.LLAMA_CPP_LOCAL && isTauri()) { |
| 545 | await NativeLlmManager.getInstance().unloadModel(); |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | /** |
| 550 | * Check if a local model is ready for inference. |
no test coverage detected