【解决todo】AI chat 返回的 message 类型不正确

This commit is contained in:
cherishsince 2024-05-21 12:11:07 +08:00
parent 3633c7415b
commit 19bd0c66ff

View File

@ -132,7 +132,7 @@ public class AiChatServiceImpl implements AiChatService {
contentBuffer.append(newContent);
// 响应结果
return new AiChatMessageSendRespVO().setSend(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class))
.setReceive(BeanUtils.toBean(userMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent));
.setReceive(BeanUtils.toBean(assistantMessage, AiChatMessageSendRespVO.Message.class).setContent(newContent));
}).doOnComplete(() -> {
chatMessageMapper.updateById(new AiChatMessageDO().setId(assistantMessage.getId()).setContent(contentBuffer.toString()));
}).doOnError(throwable -> {