mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-29 22:20:43 +00:00
Write a config file only if there is one specified
This commit is contained in:
parent
d9a1fafffe
commit
e103fa4a87
1 changed files with 28 additions and 24 deletions
|
@ -219,6 +219,8 @@ func InstallModel(basePath, nameOverride string, config *Config, configOverrides
|
|||
return err
|
||||
}
|
||||
|
||||
// write config file
|
||||
if len(configOverrides) != 0 || len(config.ConfigFile) != 0 {
|
||||
configFilePath := filepath.Join(basePath, name+".yaml")
|
||||
|
||||
// Read and update config file as map[string]interface{}
|
||||
|
@ -246,6 +248,8 @@ func InstallModel(basePath, nameOverride string, config *Config, configOverrides
|
|||
}
|
||||
|
||||
log.Debug().Msgf("Written config file %s", configFilePath)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue