chatAI-handler

This commit is contained in:
zhaoyuhang
2023-07-01 13:42:10 +08:00
parent c06934bc89
commit 440159e8a0
20 changed files with 673 additions and 288 deletions

View File

@@ -11,9 +11,13 @@ import javax.validation.constraints.NotNull;
/**
* 聊天信息点播
* Description: 消息发送请求体
* Author: <a href="https://github.com/zongzibinbin">abin</a>
* Date: 2023-03-23
*
* @author zhaoyuhang
* @date 2023/06/30
*/
@Data
@Builder

View File

@@ -38,7 +38,6 @@ import com.abin.mallchat.custom.chat.service.strategy.mark.MsgMarkFactory;
import com.abin.mallchat.custom.chat.service.strategy.msg.AbstractMsgHandler;
import com.abin.mallchat.custom.chat.service.strategy.msg.MsgHandlerFactory;
import com.abin.mallchat.custom.chat.service.strategy.msg.RecallMsgHandler;
import com.abin.mallchat.custom.openai.event.OpenAIEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -96,7 +95,6 @@ public class ChatServiceImpl implements ChatService {
msgHandler.saveMsg(insert, request);
//发布消息发送事件
applicationEventPublisher.publishEvent(new MessageSendEvent(this, insert.getId()));
applicationEventPublisher.publishEvent(new OpenAIEvent(this, insert.getId()));
return insert.getId();
}