fixed conflicts

This commit is contained in:
RockYang
2024-05-06 14:44:09 +08:00
31 changed files with 289 additions and 172 deletions

View File

@@ -144,6 +144,7 @@ func (h *ChatHandler) ChatHandle(c *gin.Context) {
for {
_, msg, err := client.Receive()
if err != nil {
logger.Debugf("close connection: %s", client.Conn.RemoteAddr())
client.Close()
h.App.ChatClients.Delete(sessionId)
h.App.ChatSession.Delete(sessionId)

View File

@@ -188,6 +188,11 @@ func (h *FunctionHandler) Dall3(c *gin.Context) {
return
}
if user.Power < h.App.SysConfig.DallPower {
resp.ERROR(c, "创建 DALL-E 绘图任务失败,算力不足")
return
}
// create dall task
prompt := utils.InterfaceToString(params["prompt"])
job := model.DallJob{