(improvement)(headless) Add semantic retrieval to term descriptions and extract relevant semantic information (#1468)

Co-authored-by: lxwcodemonkey
This commit is contained in:
LXW
2024-07-29 09:15:18 +08:00
committed by GitHub
parent ccd79e4830
commit 26f682cc45
7 changed files with 72 additions and 2 deletions

View File

@@ -48,6 +48,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);
}
@@ -89,7 +91,8 @@ public class ChatWorkflowEngine {
private void performMapping(ChatQueryContext queryCtx) {
if (Objects.isNull(queryCtx.getMapInfo())
|| MapUtils.isEmpty(queryCtx.getMapInfo().getDataSetElementMatches())) {
|| MapUtils.isEmpty(queryCtx.getMapInfo().getDataSetElementMatches())
|| queryCtx.getMapInfo().needContinueMap()) {
schemaMappers.forEach(mapper -> mapper.map(queryCtx));
}
}