add stable diffusion default negtive prompt system config

This commit is contained in:
RockYang
2024-05-07 16:21:31 +08:00
parent 8a8c43c7a5
commit 6424eb871c
8 changed files with 271 additions and 237 deletions

View File

@@ -83,7 +83,7 @@ func (h *ChatHandler) sendXunFeiMessage(
res = h.DB.Where("id", session.Model.KeyId).Where("enabled", true).Find(&apiKey)
}
// use the last unused key
if res.Error != nil {
if apiKey.Id == 0 {
res = h.DB.Where("platform", session.Model.Platform).Where("type", "chat").Where("enabled", true).Order("last_used_at ASC").First(&apiKey)
}
if res.Error != nil {