mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-07 17:53:42 +08:00
feat: different AI model consuming different amounts of use_calls
This commit is contained in:
@@ -167,9 +167,7 @@ func (h *ChatHandler) sendXunFeiMessage(
|
||||
// 消息发送成功
|
||||
if len(contents) > 0 {
|
||||
// 更新用户的对话次数
|
||||
if userVo.ChatConfig.ApiKeys[session.Model.Platform] == "" {
|
||||
h.db.Model(&model.User{}).Where("id = ?", userVo.Id).UpdateColumn("calls", gorm.Expr("calls - ?", 1))
|
||||
}
|
||||
h.subUserCalls(userVo, session)
|
||||
|
||||
if message.Role == "" {
|
||||
message.Role = "assistant"
|
||||
|
||||
Reference in New Issue
Block a user