This commit is contained in:
Adrien Bouvais 2024-05-22 09:57:03 +02:00
parent d8fd1ed936
commit 3dcf557e49

View File

@ -301,7 +301,7 @@ func ClearChatHandler(c *fiber.Ctx) error {
// Popover stuff // Popover stuff
func LoadUsageKPIHandler(c *fiber.Ctx) error { func LoadUsageKPIHandler(c *fiber.Ctx) error {
if !checkIfLogin() { if !checkIfLogin() || !checkIfHaveKey() {
return c.SendString("") return c.SendString("")
} }
var TotalUsage float32 var TotalUsage float32
@ -388,7 +388,7 @@ func LoadKeysHandler(c *fiber.Ctx) error {
} }
func LoadModelSelectionHandler(c *fiber.Ctx) error { func LoadModelSelectionHandler(c *fiber.Ctx) error {
if !checkIfLogin() { if !checkIfLogin() || !checkIfHaveKey() {
return c.SendString("") return c.SendString("")
} }
openaiExists, anthropicExists, mistralExists, groqExists, gooseaiExists, googleExists := getExistingKeys() openaiExists, anthropicExists, mistralExists, groqExists, gooseaiExists, googleExists := getExistingKeys()