diff --git a/core/http/endpoints/localai/edit_model.go b/core/http/endpoints/localai/edit_model.go index f84b4d21b..4a44610a3 100644 --- a/core/http/endpoints/localai/edit_model.go +++ b/core/http/endpoints/localai/edit_model.go @@ -55,20 +55,22 @@ func GetEditModelPage(cl *config.ModelConfigLoader, appConfig *config.Applicatio // Render the edit page with the current configuration templateData := struct { - Title string - ModelName string - Config *config.ModelConfig - ConfigJSON string - ConfigYAML string - BaseURL string - Version string + Title string + ModelName string + Config *config.ModelConfig + ConfigJSON string + ConfigYAML string + BaseURL string + Version string + DisableRuntimeSettings bool }{ - Title: "LocalAI - Edit Model " + modelName, - ModelName: modelName, - Config: &modelConfig, - ConfigYAML: string(configData), - BaseURL: httpUtils.BaseURL(c), - Version: internal.PrintableVersion(), + Title: "LocalAI - Edit Model " + modelName, + ModelName: modelName, + Config: &modelConfig, + ConfigYAML: string(configData), + BaseURL: httpUtils.BaseURL(c), + Version: internal.PrintableVersion(), + DisableRuntimeSettings: appConfig.DisableRuntimeSettings, } return c.Render(http.StatusOK, "views/model-editor", templateData) diff --git a/core/http/routes/localai.go b/core/http/routes/localai.go index f70a44b21..7b3248084 100644 --- a/core/http/routes/localai.go +++ b/core/http/routes/localai.go @@ -31,9 +31,10 @@ func RegisterLocalAIRoutes(router *echo.Echo, // Import model page router.GET("/import-model", func(c echo.Context) error { return c.Render(200, "views/model-editor", map[string]interface{}{ - "Title": "LocalAI - Import Model", - "BaseURL": middleware.BaseURL(c), - "Version": internal.PrintableVersion(), + "Title": "LocalAI - Import Model", + "BaseURL": middleware.BaseURL(c), + "Version": internal.PrintableVersion(), + "DisableRuntimeSettings": appConfig.DisableRuntimeSettings, }) }) diff --git a/core/http/views/model-editor.html b/core/http/views/model-editor.html index d72203474..7aaeeada1 100644 --- a/core/http/views/model-editor.html +++ b/core/http/views/model-editor.html @@ -539,8 +539,6 @@ - - {{template "views/partials/footer" .}}