mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
feat: enable polling configs for systems with broken fsnotify (docker volumes on windows) (#2081)
* feat: enable polling configs for systems with broken fsnotify (docker volumes on windows) Signed-off-by: Chris Jowett <421501+cryptk@users.noreply.github.com> * fix: update logging to make it clear that the config file is being polled Signed-off-by: Chris Jowett <421501+cryptk@users.noreply.github.com> --------- Signed-off-by: Chris Jowett <421501+cryptk@users.noreply.github.com>
This commit is contained in:
parent
1e37101930
commit
b9e7708643
4 changed files with 32 additions and 7 deletions
|
@ -23,6 +23,7 @@ type ApplicationConfig struct {
|
|||
UploadDir string
|
||||
ConfigsDir string
|
||||
DynamicConfigsDir string
|
||||
DynamicConfigsDirPollInterval time.Duration
|
||||
CORS bool
|
||||
PreloadJSONModels string
|
||||
PreloadModelsFromPath string
|
||||
|
@ -271,6 +272,12 @@ func WithDynamicConfigDir(dynamicConfigsDir string) AppOption {
|
|||
}
|
||||
}
|
||||
|
||||
func WithDynamicConfigDirPollInterval(interval time.Duration) AppOption {
|
||||
return func(o *ApplicationConfig) {
|
||||
o.DynamicConfigsDirPollInterval = interval
|
||||
}
|
||||
}
|
||||
|
||||
func WithApiKeys(apiKeys []string) AppOption {
|
||||
return func(o *ApplicationConfig) {
|
||||
o.ApiKeys = apiKeys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue