mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
[fix][chat] The terms in the descriptor of the term no longer undergo descriptor mapping (#1897)
This commit is contained in:
@@ -30,6 +30,7 @@ public class QueryNLReq extends SemanticQueryReq implements Serializable {
|
||||
private List<Text2SQLExemplar> dynamicExemplars = Lists.newArrayList();
|
||||
private SemanticParseInfo contextParseInfo;
|
||||
private SemanticParseInfo selectedParseInfo;
|
||||
private boolean descriptionMapped;
|
||||
|
||||
@Override
|
||||
public String toCustomizedString() {
|
||||
|
||||
@@ -20,7 +20,8 @@ public class TermDescMapper extends BaseMapper {
|
||||
public void doMap(ChatQueryContext chatQueryContext) {
|
||||
SchemaMapInfo mapInfo = chatQueryContext.getMapInfo();
|
||||
List<SchemaElement> termElements = mapInfo.getTermDescriptionToMap();
|
||||
if (CollectionUtils.isEmpty(termElements)) {
|
||||
if (CollectionUtils.isEmpty(termElements)
|
||||
|| chatQueryContext.getRequest().isDescriptionMapped()) {
|
||||
return;
|
||||
}
|
||||
for (SchemaElement schemaElement : termElements) {
|
||||
@@ -39,6 +40,7 @@ public class TermDescMapper extends BaseMapper {
|
||||
queryContext.setSemanticSchema(chatQueryContext.getSemanticSchema());
|
||||
queryContext.setModelIdToDataSetIds(chatQueryContext.getModelIdToDataSetIds());
|
||||
queryContext.setChatWorkflowState(chatQueryContext.getChatWorkflowState());
|
||||
queryContext.getRequest().setDescriptionMapped(true);
|
||||
return queryContext;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user