You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fu-hsi-service/src/main/java/com/supervision/police/vo/ChatResVO.java

55 lines
1.3 KiB
Java

package com.supervision.police.vo;
import com.supervision.chat.client.dto.chat.ChatResDTO;
7 months ago
import com.supervision.police.domain.ConversationQa;
import com.supervision.police.vo.dify.KnowledgeBaseSegmentVO;
import lombok.Data;
7 months ago
import java.util.*;
@Data
public class ChatResVO {
/**
* id
*/
private String id;
/**
*
*/
private String question;
private Date questionTime;
private String answer;
private Map<String, Object> answwerMap;
private String type;
private String intentType;
private List<String> docs;
private List<KnowledgeBaseSegmentVO> segmentVOList = new ArrayList<>();
public ChatResVO() {
}
public ChatResVO(ChatResDTO chatResDTO) {
if (Objects.isNull(chatResDTO)){
return;
}
this.answer = chatResDTO.getAnswer();
this.docs = chatResDTO.getDocs();
}
public ChatResVO(ConversationQa conversationQa) {
if (null == conversationQa){
return;
}
this.setId(conversationQa.getId());
this.setQuestion(conversationQa.getQuestion());
this.setAnswer(conversationQa.getAnswer());
this.setType(conversationQa.getType());
this.setQuestionTime(conversationQa.getQuestionTime());
this.setIntentType(conversationQa.getIntentType());
}
}