|
|
|
@ -197,8 +197,14 @@ public class AskServiceImpl implements AskService {
|
|
|
|
|
}
|
|
|
|
|
// 根据意图和节点,找到对应的结果
|
|
|
|
|
List<String> itemDetail = findItemDetailHandler.findItemDetail(matchItemLeaf.getVid(), intentEnum.getTagType(), intentEnum.getEdgeType());
|
|
|
|
|
if (CollUtil.isEmpty(itemDetail)) {
|
|
|
|
|
return RoundTalkResVO.builder().sessionId(sessionId).replyQuestion("暂不支持该意图的问答").build();
|
|
|
|
|
}
|
|
|
|
|
// 提交GPT,问问题的答案
|
|
|
|
|
String answer = answerQuestionHandler.answerQuestion(sessionParamDTO.getOriginalQuestion(), itemDetail);
|
|
|
|
|
if (StrUtil.isBlank(answer)) {
|
|
|
|
|
return RoundTalkResVO.builder().sessionId(sessionId).replyQuestion("暂时还不会回答这个问题哦").build();
|
|
|
|
|
}
|
|
|
|
|
return RoundTalkResVO.builder().sessionId(sessionId).replyQuestion(answer).build();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|