浏览代码

fix:edit submit/chat API

jimmyyem 5 月之前
父节点
当前提交
cd42cf6a88
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      internal/logic/chatrecords/submit_api_chat_logic.go

+ 3 - 0
internal/logic/chatrecords/submit_api_chat_logic.go

@@ -56,6 +56,9 @@ func (l *SubmitApiChatLogic) SubmitApiChat(req *types.ChatRecordsInfo, w http.Re
 	if req.BotId == nil || *req.BotId == 0 {
 		return
 	}
+	if req.Content == nil || *req.Content == "" {
+		return
+	}
 
 	if req.SessionId != nil && *req.SessionId > 0 {
 		sessionId = *req.SessionId