diff --git a/Chat.go b/Chat.go index d944083..e041aa6 100644 --- a/Chat.go +++ b/Chat.go @@ -444,7 +444,19 @@ func LoadSettingsHandler(c *fiber.Ctx) error { if !checkIfLogin() { return c.SendString("") } - out, err := pongo2.Must(pongo2.FromFile("views/partials/popover-settings.html")).Execute(pongo2.Context{"IsLogin": checkIfLogin()}) + + openaiExists, anthropicExists, mistralExists, groqExists, gooseaiExists, googleExists := getExistingKeys() + + out, err := pongo2.Must(pongo2.FromFile("views/partials/popover-settings.html")).Execute(pongo2.Context{ + "IsLogin": checkIfLogin(), + "OpenaiExists": openaiExists, + "AnthropicExists": anthropicExists, + "MistralExists": mistralExists, + "GroqExists": groqExists, + "GooseaiExists": gooseaiExists, + "GoogleExists": googleExists, + "AnyExists": openaiExists || anthropicExists || mistralExists || groqExists || gooseaiExists || googleExists, + }) if err != nil { panic(err) } diff --git a/views/chat.html b/views/chat.html index 82797ce..6b491f5 100644 --- a/views/chat.html +++ b/views/chat.html @@ -8,7 +8,7 @@ id="chat-input-textarea">