mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 19:51:00 +00:00
@@ -23,11 +23,15 @@ public class TermDescMapper extends BaseMapper {
|
||||
chatQueryContext.setOriQueryText(chatQueryContext.getQueryText());
|
||||
}
|
||||
for (SchemaElement schemaElement : termDescriptionToMap) {
|
||||
if (schemaElement.isDescriptionMapped()) {
|
||||
continue;
|
||||
}
|
||||
if (chatQueryContext.getQueryText().equals(schemaElement.getDescription())) {
|
||||
schemaElement.setDescriptionMapped(true);
|
||||
continue;
|
||||
}
|
||||
chatQueryContext.setQueryText(schemaElement.getDescription());
|
||||
break;
|
||||
}
|
||||
if (CollectionUtils.isEmpty(chatQueryContext.getMapInfo().getTermDescriptionToMap())) {
|
||||
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
|
||||
|
||||
@@ -47,6 +47,8 @@ public class ChatWorkflowEngine {
|
||||
parseResult.setState(ParseResp.ParseState.FAILED);
|
||||
parseResult.setErrorMsg("No semantic entities can be mapped against user question.");
|
||||
queryCtx.setChatWorkflowState(ChatWorkflowState.FINISHED);
|
||||
} else if (queryCtx.getMapInfo().needContinueMap()) {
|
||||
queryCtx.setChatWorkflowState(ChatWorkflowState.MAPPING);
|
||||
} else {
|
||||
queryCtx.setChatWorkflowState(ChatWorkflowState.PARSING);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user