| 203 | } |
| 204 | |
| 205 | void rcli_destroy(RCLIHandle handle) { |
| 206 | if (!handle) return; |
| 207 | auto* engine = static_cast<RCLIEngine*>(handle); |
| 208 | if (engine->initialized) { |
| 209 | engine->pipeline.stop_live(); |
| 210 | } |
| 211 | delete engine; |
| 212 | } |
| 213 | |
| 214 | int rcli_init(RCLIHandle handle, const char* models_dir, int gpu_layers) { |
| 215 | if (!handle || !models_dir) return -1; |