mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
chore: allow to disable gallery endpoints, improve p2p connection handling (#3256)
* Add more debug messages Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * feat: allow to disable gallery endpoints Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * improve p2p messaging Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * improve error handling Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Make sure to close the listening socket when context is exhausted Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
d6b3fbb4ad
commit
7278bf3de8
6 changed files with 44 additions and 35 deletions
|
@ -64,6 +64,7 @@ type RunCMD struct {
|
|||
EnableWatchdogBusy bool `env:"LOCALAI_WATCHDOG_BUSY,WATCHDOG_BUSY" default:"false" help:"Enable watchdog for stopping backends that are busy longer than the watchdog-busy-timeout" group:"backends"`
|
||||
WatchdogBusyTimeout string `env:"LOCALAI_WATCHDOG_BUSY_TIMEOUT,WATCHDOG_BUSY_TIMEOUT" default:"5m" help:"Threshold beyond which a busy backend should be stopped" group:"backends"`
|
||||
Federated bool `env:"LOCALAI_FEDERATED,FEDERATED" help:"Enable federated instance" group:"federated"`
|
||||
DisableGalleryEndpoint bool `env:"LOCALAI_DISABLE_GALLERY_ENDPOINT,DISABLE_GALLERY_ENDPOINT" help:"Disable the gallery endpoints" group:"api"`
|
||||
}
|
||||
|
||||
func (r *RunCMD) Run(ctx *cliContext.Context) error {
|
||||
|
@ -164,6 +165,10 @@ func (r *RunCMD) Run(ctx *cliContext.Context) error {
|
|||
opts = append(opts, config.DisableWebUI)
|
||||
}
|
||||
|
||||
if r.DisableGalleryEndpoint {
|
||||
opts = append(opts, config.DisableGalleryEndpoint)
|
||||
}
|
||||
|
||||
if idleWatchDog || busyWatchDog {
|
||||
opts = append(opts, config.EnableWatchDog)
|
||||
if idleWatchDog {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue