(models []*internalregistry.ModelInfo)
| 213 | } |
| 214 | |
| 215 | func registryModelsToPluginModels(models []*internalregistry.ModelInfo) []ModelInfo { |
| 216 | if len(models) == 0 { |
| 217 | return nil |
| 218 | } |
| 219 | out := make([]ModelInfo, 0, len(models)) |
| 220 | for _, model := range models { |
| 221 | if model == nil { |
| 222 | continue |
| 223 | } |
| 224 | out = append(out, registryModelToPluginModel(model)) |
| 225 | } |
| 226 | return out |
| 227 | } |
| 228 | |
| 229 | func registryModelToPluginModel(model *internalregistry.ModelInfo) ModelInfo { |
| 230 | if model == nil { |
no test coverage detected