feat: chat with file function is ready

This commit is contained in:
RockYang
2024-06-27 18:01:49 +08:00
parent 9343c73e0f
commit 6998dd7af4
14 changed files with 329 additions and 75 deletions

View File

@@ -79,7 +79,7 @@ func (h *ChatHandler) sendXunFeiMessage(
var res *gorm.DB
// use the bind key
if session.Model.KeyId > 0 {
res = h.DB.Where("id", session.Model.KeyId).Where("enabled", true).Find(&apiKey)
res = h.DB.Where("id", session.Model.KeyId).Find(&apiKey)
}
// use the last unused key
if apiKey.Id == 0 {