|
|
|
@ -10,6 +10,7 @@ import com.supervision.enums.EntityQuestionEnum;
|
|
|
|
|
import com.supervision.enums.IdentifyIntentEnum;
|
|
|
|
|
import com.supervision.enums.RetireRoleEnum;
|
|
|
|
|
import com.supervision.exception.BusinessException;
|
|
|
|
|
import com.supervision.exception.ItemExtractException;
|
|
|
|
|
import com.supervision.handler.gpt.AnswerQuestionHandler;
|
|
|
|
|
import com.supervision.handler.gpt.ConditionJudgeHandler;
|
|
|
|
|
import com.supervision.handler.gpt.IdentifyIntentHandler;
|
|
|
|
@ -323,7 +324,13 @@ public class AskServiceImpl implements AskService {
|
|
|
|
|
throw new BusinessException("暂不支持该意图的问答");
|
|
|
|
|
}
|
|
|
|
|
List<String> allItemNode = findItemNodeHandler.findAllItemNode();
|
|
|
|
|
List<String> extractValue = itemExtractHandler.itemExtractByPossibleItemWithExample(singleTalkReqVO.getUserTalk(), allItemNode);
|
|
|
|
|
List<String> extractValue;
|
|
|
|
|
try {
|
|
|
|
|
extractValue = itemExtractHandler.itemExtractByPossibleItemWithExample(singleTalkReqVO.getUserTalk(), allItemNode);
|
|
|
|
|
}catch (ItemExtractException e){
|
|
|
|
|
return SingleTalkResVO.builder().answerText("您好,我暂时还不会回答这个问题哦!").build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// String extractValue = itemExtractHandler.itemExtractBusiness(singleTalkReqVO.getUserTalk());
|
|
|
|
|
// 根据提取的内容,开始在知识图谱中寻找节点(首先找叶子节点,如果叶子节点有数据,直接返回,如果叶子节点没数据,再去找分支节点)
|
|
|
|
|
List<ItemLeaf> allMatchLeafNode = findItemNodeHandler.findAllMatchLeafNode(extractValue);
|
|
|
|
|