fix(backends gallery): propagate p2p settings to correctly draw menu (#5684)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto 2025-06-18 22:06:12 +02:00 committed by GitHub
parent 3fcfaec7c8
commit 9bcf4c56f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,7 @@ import (
"github.com/mudler/LocalAI/core/gallery" "github.com/mudler/LocalAI/core/gallery"
"github.com/mudler/LocalAI/core/http/elements" "github.com/mudler/LocalAI/core/http/elements"
"github.com/mudler/LocalAI/core/http/utils" "github.com/mudler/LocalAI/core/http/utils"
"github.com/mudler/LocalAI/core/p2p"
"github.com/mudler/LocalAI/core/services" "github.com/mudler/LocalAI/core/services"
"github.com/mudler/LocalAI/internal" "github.com/mudler/LocalAI/internal"
"github.com/rs/zerolog/log" "github.com/rs/zerolog/log"
@ -70,6 +71,7 @@ func registerBackendGalleryRoutes(app *fiber.App, appConfig *config.ApplicationC
"ProcessingBackends": processingBackendsData, "ProcessingBackends": processingBackendsData,
"AvailableBackends": len(backends), "AvailableBackends": len(backends),
"TaskTypes": taskTypes, "TaskTypes": taskTypes,
"IsP2PEnabled": p2p.IsP2PEnabled(),
} }
if page == "" { if page == "" {