mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 06:27:21 +00:00
(improvement)(chat) Remove candidateParses in ParseResp (#536)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -3,7 +3,6 @@ package com.tencent.supersonic.chat.api.pojo.response;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.chat.api.pojo.SemanticParseInfo;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@@ -13,7 +12,6 @@ public class ParseResp {
|
||||
private Long queryId;
|
||||
private ParseState state;
|
||||
private List<SemanticParseInfo> selectedParses = Lists.newArrayList();
|
||||
private List<SemanticParseInfo> candidateParses = Lists.newArrayList();
|
||||
private ParseTimeCostDO parseTimeCost = new ParseTimeCostDO();
|
||||
|
||||
public enum ParseState {
|
||||
@@ -22,14 +20,4 @@ public class ParseResp {
|
||||
FAILED
|
||||
}
|
||||
|
||||
//Compatible with front-end
|
||||
public List<SemanticParseInfo> getSelectedParses() {
|
||||
selectedParses = Lists.newArrayList();
|
||||
if (CollectionUtils.isNotEmpty(candidateParses)) {
|
||||
selectedParses.addAll(candidateParses);
|
||||
candidateParses.clear();
|
||||
}
|
||||
return selectedParses;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user