mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
[improvement][headless-chat]Incorporate Request into Context objects, removing unnecessary copy.
This commit is contained in:
@@ -7,7 +7,6 @@ import com.tencent.supersonic.common.pojo.Text2SQLExemplar;
|
||||
import com.tencent.supersonic.common.pojo.User;
|
||||
import com.tencent.supersonic.common.pojo.enums.Text2SQLType;
|
||||
import com.tencent.supersonic.headless.api.pojo.QueryDataType;
|
||||
import com.tencent.supersonic.headless.api.pojo.SchemaMapInfo;
|
||||
import com.tencent.supersonic.headless.api.pojo.SemanticParseInfo;
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.MapModeEnum;
|
||||
import lombok.Data;
|
||||
@@ -17,7 +16,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
public class QueryNLReq {
|
||||
public class QueryNLReq extends SemanticQueryReq {
|
||||
private String queryText;
|
||||
private Set<Long> dataSetIds = Sets.newHashSet();
|
||||
private User user;
|
||||
@@ -25,9 +24,13 @@ public class QueryNLReq {
|
||||
private boolean saveAnswer = true;
|
||||
private Text2SQLType text2SQLType = Text2SQLType.RULE_AND_LLM;
|
||||
private MapModeEnum mapModeEnum = MapModeEnum.STRICT;
|
||||
private SchemaMapInfo mapInfo = new SchemaMapInfo();
|
||||
private QueryDataType queryDataType = QueryDataType.ALL;
|
||||
private Map<String, ChatApp> chatAppConfig;
|
||||
private List<Text2SQLExemplar> dynamicExemplars = Lists.newArrayList();
|
||||
private SemanticParseInfo contextParseInfo;
|
||||
|
||||
@Override
|
||||
public String toCustomizedString() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,12 +50,4 @@ public abstract class SemanticQueryReq {
|
||||
public Set<Long> getModelIdSet() {
|
||||
return modelIds;
|
||||
}
|
||||
|
||||
public boolean isNeedAuth() {
|
||||
return needAuth;
|
||||
}
|
||||
|
||||
public void setNeedAuth(boolean needAuth) {
|
||||
this.needAuth = needAuth;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user