修改方法名

main
xueqingkun 11 months ago
parent 6e2750af3d
commit 798ed92f6c

@ -91,7 +91,7 @@ public class RobotTalkServiceImpl implements RobotTalkService {
// 匹配问题意图
MatchQuestionAnswerDTO matchQuestionAnswerDTO = matchQuestionAnswer(robotTalkReq.getMessage());
question2Answer(robotTalkReq, robotTalkDTO, matchQuestionAnswerDTO,config);
setSuspectInfoAndNextFlag(robotTalkReq, robotTalkDTO, matchQuestionAnswerDTO,config);
if (Objects.isNull(matchQuestionAnswerDTO) && robotTalkDTO.isDoNext()){
// 未匹配到查询意图,设置默认错误语
@ -101,7 +101,7 @@ public class RobotTalkServiceImpl implements RobotTalkService {
}
if (robotTalkDTO.isDoNext()){
QueryProcessDTO matchAnswer = queryMatchAnswer(sessionId, matchQuestionAnswerDTO, robotTalkDTO, robotTalkReq.getTitleContent());
QueryProcessDTO matchAnswer = queryMatch2Answer(sessionId, matchQuestionAnswerDTO, robotTalkDTO, robotTalkReq.getTitleContent());
if (Integer.valueOf(0).equals(matchAnswer.getState()) &&
Integer.valueOf(3).equals(matchAnswer.getContentType())
&& matchAnswer.getByteContent() != null){
@ -128,7 +128,7 @@ public class RobotTalkServiceImpl implements RobotTalkService {
return robotTalkDTO;
}
private void question2Answer(RobotTalkReq robotTalkReq,RobotTalkDTO robotTalkDTO, MatchQuestionAnswerDTO matchQuestionAnswerDTO,IrRobotConfig config) {
private void setSuspectInfoAndNextFlag(RobotTalkReq robotTalkReq, RobotTalkDTO robotTalkDTO, MatchQuestionAnswerDTO matchQuestionAnswerDTO, IrRobotConfig config) {
String sessionId = robotTalkReq.getSessionId();
@ -210,8 +210,8 @@ public class RobotTalkServiceImpl implements RobotTalkService {
return irVoice;
}
private QueryProcessDTO queryMatchAnswer(String sessionId, MatchQuestionAnswerDTO matchQuestionAnswerDTO,
RobotTalkDTO robotTalkDTO,SuspectInfo suspectInfo) {
private QueryProcessDTO queryMatch2Answer(String sessionId, MatchQuestionAnswerDTO matchQuestionAnswerDTO,
RobotTalkDTO robotTalkDTO, SuspectInfo suspectInfo) {
QueryProcessDTO process = QueryProcessDTO.builder().state(2).build();
if (Objects.nonNull(matchQuestionAnswerDTO) && robotTalkDTO.isDoNext()) {
process = queryTemplateProcessor.process(matchQuestionAnswerDTO.getMatchQuestionCode(), sessionId,

Loading…
Cancel
Save