* Unload the currently loaded local model for a given server type.
(server: string)
| 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. |
no test coverage detected