|
@@ -91,13 +91,13 @@ func (l *SubmitApiChatLogic) SubmitApiChat(req *types.ChatRecordsInfo, w http.Re
|
|
|
if *req.BotType == 2 { // 从FastGPT里获取回答
|
|
|
card, err := l.svcCtx.DB.WxCard.Query().Where(wxcard.ID(*req.BotId)).Only(l.ctx)
|
|
|
if err != nil {
|
|
|
- return //TODO 这里应该报错
|
|
|
+ return
|
|
|
}
|
|
|
fastgptSendChat(l, w, *req.Content, card.APIBase, card.APIKey, sessionId, userId, *req.BotId, *req.BotType)
|
|
|
} else if *req.BotType == 3 { // 从数字员工里获取回答
|
|
|
employee, err := l.svcCtx.DB.Employee.Query().Where(employee.ID(*req.BotId)).Only(l.ctx)
|
|
|
if err != nil {
|
|
|
- return //TODO 这里应该报错
|
|
|
+ return
|
|
|
}
|
|
|
difySendChat(l, w, *req.Content, employee.APIBase, employee.APIKey, sessionId, userId, *req.BotId, *req.BotType)
|
|
|
}
|