feat(libpath): refactor and expose functions for external library paths (#2578)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2024-06-16 13:58:28 +02:00 committed by GitHub
parent ac4a94dd44
commit 94cfaad7f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 59 additions and 23 deletions

View file

@ -15,6 +15,7 @@ type ApplicationConfig struct {
Context context.Context
ConfigFile string
ModelPath string
LibPath string
UploadLimitMB, Threads, ContextSize int
DisableWebUI bool
F16 bool
@ -101,6 +102,12 @@ func WithModelLibraryURL(url string) AppOption {
}
}
func WithLibPath(path string) AppOption {
return func(o *ApplicationConfig) {
o.LibPath = path
}
}
var EnableWatchDog = func(o *ApplicationConfig) {
o.WatchDog = true
}