mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
feat(welcome): add simple welcome page (#1912)
* feat(welcome): add simple welcome page * feat(api): add 404 handling
This commit is contained in:
parent
93f0b7ae03
commit
66ee4afb95
10 changed files with 189 additions and 1 deletions
11
main.go
11
main.go
|
@ -189,6 +189,12 @@ func main() {
|
|||
EnvVars: []string{"WATCHDOG_IDLE"},
|
||||
Value: false,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "disable-welcome",
|
||||
Usage: "Disable welcome pages",
|
||||
EnvVars: []string{"DISABLE_WELCOME"},
|
||||
Value: false,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "enable-watchdog-busy",
|
||||
Usage: "Enable watchdog for stopping busy backends that exceed a defined threshold.",
|
||||
|
@ -264,6 +270,11 @@ For a list of compatible model, check out: https://localai.io/model-compatibilit
|
|||
|
||||
idleWatchDog := ctx.Bool("enable-watchdog-idle")
|
||||
busyWatchDog := ctx.Bool("enable-watchdog-busy")
|
||||
|
||||
if ctx.Bool("disable-welcome") {
|
||||
opts = append(opts, config.DisableWelcomePage)
|
||||
}
|
||||
|
||||
if idleWatchDog || busyWatchDog {
|
||||
opts = append(opts, config.EnableWatchDog)
|
||||
if idleWatchDog {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue