|
@ -1,8 +1,6 @@ |
|
|
package com.digiwin.athena.app.chatFile.service.chatFile; |
|
|
package com.digiwin.athena.app.chatFile.service.chatFile; |
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.TypeReference; |
|
|
import com.alibaba.fastjson.TypeReference; |
|
|
import com.alibaba.nacos.common.utils.CollectionUtils; |
|
|
|
|
|
import com.alibaba.nacos.common.utils.StringUtils; |
|
|
|
|
|
import com.digiwin.app.container.exceptions.DWBusinessException; |
|
|
import com.digiwin.app.container.exceptions.DWBusinessException; |
|
|
import com.digiwin.app.service.DWEAIResult; |
|
|
import com.digiwin.app.service.DWEAIResult; |
|
|
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity; |
|
|
import com.digiwin.athena.app.chatFile.infra.entity.ChatFileEntity; |
|
@ -37,7 +35,8 @@ public class ChatFileCreateEAIService extends AbsEAIService { |
|
|
@Override |
|
|
@Override |
|
|
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { |
|
|
public DWEAIResult execute(Map<String, String> headers, String messageBody) throws Exception { |
|
|
EAIRequest eaiRequest = EAIRequest.build(messageBody); |
|
|
EAIRequest eaiRequest = EAIRequest.build(messageBody); |
|
|
ChatFileEntity chatFileInfo = eaiRequest.getObject("chat_file_info", new TypeReference<ChatFileEntity>(){}); |
|
|
|
|
|
|
|
|
List<ChatFileEntity> chatFileInfoList = eaiRequest.getObject("chat_file_info", new TypeReference<List<ChatFileEntity>>(){}); |
|
|
|
|
|
ChatFileEntity chatFileInfo = chatFileInfoList.get(0); |
|
|
|
|
|
|
|
|
if (Objects.isNull(chatFileInfo)){ |
|
|
if (Objects.isNull(chatFileInfo)){ |
|
|
throw new DWBusinessException("缺少必要参数chat_file_info"); |
|
|
throw new DWBusinessException("缺少必要参数chat_file_info"); |
|
|