unloadTextModel method
void
unloadTextModel()
Unload the text model.
Implementation
void unloadTextModel() {
if (_handle == null || _backendType != 'llamacpp') return;
try {
final cleanup = _lib.lookupFunction<RacLlmComponentCleanupNative,
RacLlmComponentCleanupDart>('rac_llm_component_cleanup');
cleanup(_handle!);
_currentModel = null;
} catch (e) {
throw NativeBackendException('Failed to unload text model: $e');
}
}