(fix)(headless) Fix queryText replaced when semantic retrieval to term descriptions (#1469)

Co-authored-by: lxwcodemonkey
This commit is contained in:
LXW
2024-07-29 10:18:58 +08:00
committed by GitHub
parent 26f682cc45
commit 9a14728152

View File

@@ -17,9 +17,6 @@ public class TermDescMapper extends BaseMapper {
public void doMap(ChatQueryContext chatQueryContext) {
List<SchemaElement> termDescriptionToMap = chatQueryContext.getMapInfo().getTermDescriptionToMap();
if (CollectionUtils.isEmpty(termDescriptionToMap)) {
if (StringUtils.isNotBlank(chatQueryContext.getOriQueryText())) {
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
}
return;
}
if (StringUtils.isBlank(chatQueryContext.getOriQueryText())) {
@@ -32,6 +29,9 @@ public class TermDescMapper extends BaseMapper {
}
chatQueryContext.setQueryText(schemaElement.getDescription());
}
if (CollectionUtils.isEmpty(chatQueryContext.getMapInfo().getTermDescriptionToMap())) {
chatQueryContext.setQueryText(chatQueryContext.getOriQueryText());
}
}
}