2024-04-20 23:19:57 +00:00
|
|
|
package routes
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/go-skynet/LocalAI/core/config"
|
|
|
|
"github.com/go-skynet/LocalAI/core/http/endpoints/localai"
|
|
|
|
"github.com/go-skynet/LocalAI/pkg/model"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
func RegisterPagesRoutes(app *fiber.App,
|
|
|
|
cl *config.BackendConfigLoader,
|
|
|
|
ml *model.ModelLoader,
|
|
|
|
appConfig *config.ApplicationConfig,
|
|
|
|
auth func(*fiber.Ctx) error) {
|
|
|
|
|
|
|
|
if !appConfig.DisableWelcomePage {
|
2024-04-23 07:22:58 +00:00
|
|
|
app.Get("/", auth, localai.WelcomeEndpoint(appConfig, cl, ml))
|
2024-04-20 23:19:57 +00:00
|
|
|
}
|
|
|
|
}
|