mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-30 06:30: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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// write config file
|
||||||
|
if len(configOverrides) != 0 || len(config.ConfigFile) != 0 {
|
||||||
configFilePath := filepath.Join(basePath, name+".yaml")
|
configFilePath := filepath.Join(basePath, name+".yaml")
|
||||||
|
|
||||||
// Read and update config file as map[string]interface{}
|
// 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)
|
log.Debug().Msgf("Written config file %s", configFilePath)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue