mirror of
https://github.com/mudler/LocalAI
synced 2026-04-21 13:27:21 +00:00
fix(ui): pass by needed values to unbreak model editor
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
df792d6243
commit
352b8aaa1b
3 changed files with 19 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -539,8 +539,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "views/partials/footer" .}}
|
||||
</div>
|
||||
|
||||
<!-- Include JS-YAML library -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue