mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +00:00
(feature)(chat)Rewrite error message to make it more understandable to the user. #1320
This commit is contained in:
@@ -23,10 +23,6 @@ public class SchemaMapInfo {
|
||||
return dataSetElementMatches;
|
||||
}
|
||||
|
||||
public void setDataSetElementMatches(Map<Long, List<SchemaElementMatch>> dataSetElementMatches) {
|
||||
this.dataSetElementMatches = dataSetElementMatches;
|
||||
}
|
||||
|
||||
public void setMatchedElements(Long dataSet, List<SchemaElementMatch> elementMatches) {
|
||||
dataSetElementMatches.put(dataSet, elementMatches);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.tencent.supersonic.headless.api.pojo.response;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.headless.api.pojo.SemanticParseInfo;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
@@ -14,7 +13,8 @@ public class ParseResp {
|
||||
private Integer chatId;
|
||||
private String queryText;
|
||||
private Long queryId;
|
||||
private ParseState state;
|
||||
private ParseState state = ParseState.PENDING;
|
||||
private String errorMsg;
|
||||
private List<SemanticParseInfo> selectedParses = Lists.newArrayList();
|
||||
private ParseTimeCostResp parseTimeCost = new ParseTimeCostResp();
|
||||
|
||||
@@ -38,15 +38,6 @@ public class ParseResp {
|
||||
return selectedParses;
|
||||
}
|
||||
|
||||
public ParseState getState() {
|
||||
if (CollectionUtils.isNotEmpty(selectedParses)) {
|
||||
this.state = ParseResp.ParseState.COMPLETED;
|
||||
} else {
|
||||
this.state = ParseState.FAILED;
|
||||
}
|
||||
return this.state;
|
||||
}
|
||||
|
||||
private void generateParseInfoId(List<SemanticParseInfo> selectedParses) {
|
||||
for (int i = 0; i < selectedParses.size(); i++) {
|
||||
SemanticParseInfo parseInfo = selectedParses.get(i);
|
||||
|
||||
Reference in New Issue
Block a user