mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-08-12 18:50:58 +00:00
release: v4.2.8
整合开源版 v4.2.8 功能:Sora2 视频、路由重构、手机站开关、DALL-E 参考图,以及启动时自动同步数据表字段等修复与优化。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -212,6 +212,14 @@ func (h *ChatHandler) sendOpenAiMessage(
|
||||
} else {
|
||||
errMsg = utils.InterfaceToString(apiRes.Data)
|
||||
contents = append(contents, errMsg)
|
||||
// 扣减算力
|
||||
if function.Power > 0 {
|
||||
h.userService.DecreasePower(userVo.Id, function.Power, model.PowerLog{
|
||||
Type: types.PowerConsume,
|
||||
Model: function.Name,
|
||||
Remark: fmt.Sprintf("函数调用,%s(%s)", function.Label, function.Name),
|
||||
})
|
||||
}
|
||||
}
|
||||
pushMessage(c, "text", errMsg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user