(model string)
| 293 | } |
| 294 | |
| 295 | func RemoveModel(model string) error { |
| 296 | if client == nil { |
| 297 | return fmt.Errorf("client not initialized") |
| 298 | } |
| 299 | taskExecutor.CloseModelPipeline(model) |
| 300 | err := client.Delete(context.Background(), &api.DeleteRequest{Model: model}) |
| 301 | if err != nil { |
| 302 | if err.Error() == fmt.Sprintf("model '%s' not found", model) { |
| 303 | return nil |
| 304 | } |
| 305 | } |
| 306 | return err |
| 307 | } |
| 308 | |
| 309 | func ModelsInstalled() ([]Model, error) { |
| 310 | if client == nil { |
nothing calls this directly
no test coverage detected