mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
feat(startup): fetch model definition remotely (#1654)
This commit is contained in:
parent
f928899338
commit
6ac5d814fb
6 changed files with 68 additions and 6 deletions
11
main.go
11
main.go
|
@ -26,6 +26,10 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
remoteLibraryURL = "https://raw.githubusercontent.com/mudler/LocalAI/master/embedded/model_library.yaml"
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
|
||||
// clean up process
|
||||
|
@ -94,6 +98,12 @@ func main() {
|
|||
Usage: "JSON list of galleries",
|
||||
EnvVars: []string{"GALLERIES"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "remote-library",
|
||||
Usage: "A LocalAI remote library URL",
|
||||
EnvVars: []string{"REMOTE_LIBRARY"},
|
||||
Value: remoteLibraryURL,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "preload-models",
|
||||
Usage: "A List of models to apply in JSON at start",
|
||||
|
@ -219,6 +229,7 @@ For a list of compatible model, check out: https://localai.io/model-compatibilit
|
|||
options.WithAudioDir(ctx.String("audio-path")),
|
||||
options.WithF16(ctx.Bool("f16")),
|
||||
options.WithStringGalleries(ctx.String("galleries")),
|
||||
options.WithModelLibraryURL(ctx.String("remote-library")),
|
||||
options.WithDisableMessage(false),
|
||||
options.WithCors(ctx.Bool("cors")),
|
||||
options.WithCorsAllowOrigins(ctx.String("cors-allow-origins")),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue