MCPcopy
hub / github.com/mudler/LocalAI / GetLocalModelConfiguration

Function GetLocalModelConfiguration

core/gallery/models.go:344–348  ·  view source on GitHub ↗
(basePath string, name string)

Source from the content-addressed store, hash-verified

342}
343
344func GetLocalModelConfiguration(basePath string, name string) (*ModelConfig, error) {
345 name = strings.ReplaceAll(name, string(os.PathSeparator), "__")
346 galleryFile := filepath.Join(basePath, galleryFileName(name))
347 return ReadConfigFile[ModelConfig](galleryFile)
348}
349
350func listModelFiles(systemState *system.SystemState, name string) ([]string, error) {
351

Callers 1

WelcomeEndpointFunction · 0.92

Calls 1

galleryFileNameFunction · 0.85

Tested by

no test coverage detected