mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
[improvement][project] supersonic 0.7.0 version backend update (#24)
* [improvement][project] supersonic 0.7.0 version backend update * [improvement][project] supersonic 0.7.0 version backend update * [improvement][project] supersonic 0.7.0 version readme update --------- Co-authored-by: jolunoluo <jolunoluo@tencent.com>
This commit is contained in:
@@ -16,4 +16,6 @@ public interface SemanticQuery {
|
||||
QueryResult execute(User user) throws SqlParseException;
|
||||
|
||||
SemanticParseInfo getParseInfo();
|
||||
|
||||
void setParseInfo(SemanticParseInfo parseInfo);
|
||||
}
|
||||
|
||||
@@ -13,11 +13,15 @@ public class DomainSchema {
|
||||
private Set<SchemaElement> metrics = new HashSet<>();
|
||||
private Set<SchemaElement> dimensions = new HashSet<>();
|
||||
private Set<SchemaElement> dimensionValues = new HashSet<>();
|
||||
private Set<SchemaElement> entities = new HashSet<>();
|
||||
private SchemaElement entity = new SchemaElement();
|
||||
|
||||
public SchemaElement getElement(SchemaElementType elementType, long elementID) {
|
||||
Optional<SchemaElement> element = Optional.empty();
|
||||
|
||||
switch (elementType) {
|
||||
case ENTITY:
|
||||
element = Optional.ofNullable(entity);
|
||||
break;
|
||||
case DOMAIN:
|
||||
element = Optional.of(domain);
|
||||
break;
|
||||
@@ -27,9 +31,6 @@ public class DomainSchema {
|
||||
case DIMENSION:
|
||||
element = dimensions.stream().filter(e -> e.getId() == elementID).findFirst();
|
||||
break;
|
||||
case ENTITY:
|
||||
element = entities.stream().filter(e -> e.getId() == elementID).findFirst();
|
||||
break;
|
||||
case VALUE:
|
||||
element = dimensionValues.stream().filter(e -> e.getId() == elementID).findFirst();
|
||||
default:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.tencent.supersonic.chat.api.pojo;
|
||||
|
||||
import com.tencent.supersonic.chat.api.component.SemanticQuery;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.QueryRequest;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.QueryReq;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -10,11 +10,11 @@ import java.util.List;
|
||||
@Data
|
||||
public class QueryContext {
|
||||
|
||||
private QueryRequest request;
|
||||
private QueryReq request;
|
||||
private List<SemanticQuery> candidateQueries = new ArrayList<>();
|
||||
private SchemaMapInfo mapInfo = new SchemaMapInfo();
|
||||
|
||||
public QueryContext(QueryRequest request) {
|
||||
public QueryContext(QueryReq request) {
|
||||
this.request = request;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,13 @@ import com.google.common.base.Objects;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.*;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
//@AllArgsConstructor
|
||||
public class SchemaElement implements Serializable {
|
||||
|
||||
private Long domain;
|
||||
@@ -20,8 +22,8 @@ public class SchemaElement implements Serializable {
|
||||
private SchemaElementType type;
|
||||
private List<String> alias;
|
||||
|
||||
public SchemaElement() {
|
||||
}
|
||||
// public SchemaElement() {
|
||||
// }
|
||||
|
||||
public SchemaElement(Long domain, Long id, String name, String bizName,
|
||||
Long useCnt, SchemaElementType type, List<String> alias) {
|
||||
|
||||
@@ -18,4 +18,10 @@ public class SchemaElementMatch {
|
||||
String detectWord;
|
||||
String word;
|
||||
Long frequency;
|
||||
MatchMode mode = MatchMode.CURRENT;
|
||||
|
||||
public enum MatchMode {
|
||||
CURRENT,
|
||||
INHERIT
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,32 @@
|
||||
package com.tencent.supersonic.chat.api.pojo;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.request.QueryFilter;
|
||||
import com.tencent.supersonic.common.pojo.DateConf;
|
||||
import com.tencent.supersonic.common.pojo.Order;
|
||||
import com.tencent.supersonic.common.pojo.enums.AggregateTypeEnum;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SemanticParseInfo {
|
||||
|
||||
String queryMode;
|
||||
SchemaElement domain;
|
||||
Set<SchemaElement> metrics = new LinkedHashSet();
|
||||
Set<SchemaElement> dimensions = new LinkedHashSet();
|
||||
Long entity = 0L;
|
||||
AggregateTypeEnum aggType = AggregateTypeEnum.NONE;
|
||||
Set<QueryFilter> dimensionFilters = new LinkedHashSet();
|
||||
Set<QueryFilter> metricFilters = new LinkedHashSet();
|
||||
private String queryMode;
|
||||
private SchemaElement domain;
|
||||
private Set<SchemaElement> metrics = new TreeSet<>(new SchemaNameLengthComparator());
|
||||
private Set<SchemaElement> dimensions = new LinkedHashSet();
|
||||
private SchemaElement entity;
|
||||
private AggregateTypeEnum aggType = AggregateTypeEnum.NONE;
|
||||
private Set<QueryFilter> dimensionFilters = new LinkedHashSet();
|
||||
private Set<QueryFilter> metricFilters = new LinkedHashSet();
|
||||
private Set<Order> orders = new LinkedHashSet();
|
||||
private DateConf dateInfo;
|
||||
private Long limit;
|
||||
private Boolean nativeQuery = false;
|
||||
private Double bonus = 0d;
|
||||
private double score;
|
||||
private List<SchemaElementMatch> elementMatches = new ArrayList<>();
|
||||
private Map<String, Object> properties;
|
||||
private Map<String, Object> properties = new HashMap<>();
|
||||
|
||||
public Long getDomainId() {
|
||||
return domain != null ? domain.getId() : 0L;
|
||||
@@ -40,8 +36,9 @@ public class SemanticParseInfo {
|
||||
return domain != null ? domain.getName() : "null";
|
||||
}
|
||||
|
||||
public Set<SchemaElement> getMetrics() {
|
||||
this.metrics = this.metrics.stream().sorted((o1, o2) -> {
|
||||
private static class SchemaNameLengthComparator implements Comparator<SchemaElement> {
|
||||
@Override
|
||||
public int compare(SchemaElement o1, SchemaElement o2) {
|
||||
int len1 = o1.getName().length();
|
||||
int len2 = o2.getName().length();
|
||||
if (len1 != len2) {
|
||||
@@ -49,7 +46,7 @@ public class SemanticParseInfo {
|
||||
} else {
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
}
|
||||
}).collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
return this.metrics;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SemanticSchema implements Serializable {
|
||||
|
||||
public List<SchemaElement> getEntities() {
|
||||
List<SchemaElement> entities = new ArrayList<>();
|
||||
domainSchemaList.stream().forEach(d -> entities.addAll(d.getEntities()));
|
||||
domainSchemaList.stream().forEach(d -> entities.add(d.getEntity()));
|
||||
return entities;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatAggConfigReq {
|
||||
|
||||
/**
|
||||
* invisible dimensions/metrics
|
||||
*/
|
||||
private ItemVisibility visibility;
|
||||
|
||||
/**
|
||||
* information about dictionary about the domain
|
||||
*/
|
||||
private List<KnowledgeInfoReq> knowledgeInfos;
|
||||
|
||||
private KnowledgeAdvancedConfig globalKnowledgeConfig;
|
||||
|
||||
private ChatDefaultConfigReq chatDefaultConfig;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* extended information command about domain
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class ChatConfigBaseReq {
|
||||
|
||||
private Long domainId;
|
||||
|
||||
/**
|
||||
* the chatDetailConfig about the domain
|
||||
*/
|
||||
private ChatDetailConfigReq chatDetailConfig;
|
||||
|
||||
/**
|
||||
* the chatAggConfig about the domain
|
||||
*/
|
||||
private ChatAggConfigReq chatAggConfig;
|
||||
|
||||
|
||||
/**
|
||||
* the recommended questions about the domain
|
||||
*/
|
||||
private List<RecommendedQuestionReq> recommendedQuestions;
|
||||
|
||||
/**
|
||||
* available status
|
||||
*/
|
||||
private StatusEnum status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ChatConfigEditReqReq extends ChatConfigBaseReq {
|
||||
|
||||
private Long id;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public class ChatConfigFilter {
|
||||
|
||||
private Long id;
|
||||
private Long domainId;
|
||||
private StatusEnum status = StatusEnum.ONLINE;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
|
||||
import com.tencent.supersonic.common.pojo.Constants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatDefaultConfigReq {
|
||||
|
||||
private List<Long> dimensionIds = new ArrayList<>();
|
||||
private List<Long> metricIds = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* default time span unit
|
||||
*/
|
||||
private Integer unit = 1;
|
||||
|
||||
/**
|
||||
* default time type: day
|
||||
* DAY, WEEK, MONTH, YEAR
|
||||
*/
|
||||
private String period = Constants.DAY;
|
||||
|
||||
private TimeMode timeMode = TimeMode.LAST;
|
||||
|
||||
public enum TimeMode {
|
||||
/**
|
||||
* date mode
|
||||
* LAST - a certain time
|
||||
* RECENT - a period time
|
||||
*/
|
||||
LAST, RECENT
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatDetailConfigReq {
|
||||
|
||||
/**
|
||||
* invisible dimensions/metrics
|
||||
*/
|
||||
private ItemVisibility visibility;
|
||||
|
||||
/**
|
||||
* information about dictionary about the domain
|
||||
*/
|
||||
private List<KnowledgeInfoReq> knowledgeInfos;
|
||||
|
||||
private KnowledgeAdvancedConfig globalKnowledgeConfig;
|
||||
|
||||
private ChatDefaultConfigReq chatDefaultConfig;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* the entity info about the domain
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
public class Entity {
|
||||
|
||||
/**
|
||||
* uniquely identifies an entity
|
||||
*/
|
||||
private Long entityId;
|
||||
|
||||
/**
|
||||
* entity name list
|
||||
*/
|
||||
private List<String> names;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import com.tencent.supersonic.chat.api.pojo.SemanticParseInfo;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExecuteQueryReq {
|
||||
private User user;
|
||||
private Integer chatId;
|
||||
private String queryText;
|
||||
private SemanticParseInfo parseInfo;
|
||||
private boolean saveAnswer = true;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class ItemVisibility {
|
||||
|
||||
/**
|
||||
* invisible dimensions
|
||||
*/
|
||||
private List<Long> blackDimIdList = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* invisible metrics
|
||||
*/
|
||||
private List<Long> blackMetricIdList = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* advanced knowledge config
|
||||
*/
|
||||
@Data
|
||||
public class KnowledgeAdvancedConfig {
|
||||
|
||||
private List<String> blackList = new ArrayList<>();
|
||||
private List<String> whiteList = new ArrayList<>();
|
||||
private List<String> ruleList = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.TypeEnums;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* information about dictionary about the domain
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class KnowledgeInfoReq {
|
||||
|
||||
/**
|
||||
* metricId、DimensionId、domainId
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
private String bizName;
|
||||
/**
|
||||
* type: IntentionTypeEnum
|
||||
* temporarily only supports dimension-related information
|
||||
*/
|
||||
@NotNull
|
||||
private TypeEnums type = TypeEnums.DIMENSION;
|
||||
|
||||
private Boolean searchEnable = false;
|
||||
|
||||
/**
|
||||
* advanced knowledge config for single item
|
||||
*/
|
||||
private KnowledgeAdvancedConfig knowledgeAdvancedConfig;
|
||||
|
||||
|
||||
}
|
||||
@@ -7,10 +7,9 @@ import lombok.Data;
|
||||
public class PluginQueryReq {
|
||||
|
||||
|
||||
private String showElementId;
|
||||
private String name;
|
||||
|
||||
//DASHBOARD WIDGET
|
||||
private String showType;
|
||||
private String parseMode;
|
||||
|
||||
private String type;
|
||||
|
||||
@@ -18,5 +17,5 @@ public class PluginQueryReq {
|
||||
|
||||
private String pattern;
|
||||
|
||||
|
||||
private String createdBy;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.tencent.supersonic.common.pojo.Order;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryDataRequest {
|
||||
public class QueryDataReq {
|
||||
String queryMode;
|
||||
SchemaElement domain;
|
||||
Set<SchemaElement> metrics = new HashSet<>();
|
||||
@@ -4,8 +4,7 @@ import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryRequest {
|
||||
|
||||
public class QueryReq {
|
||||
private String queryText;
|
||||
private Integer chatId;
|
||||
private Long domainId = 0L;
|
||||
@@ -1,11 +1,15 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class RecommendedQuestion {
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class RecommendedQuestionReq {
|
||||
|
||||
private String question;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.request.KnowledgeAdvancedConfig;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.KnowledgeInfoReq;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatAggRichConfigResp {
|
||||
|
||||
/**
|
||||
* invisible dimensions/metrics
|
||||
*/
|
||||
private ItemVisibilityInfo visibility;
|
||||
|
||||
/**
|
||||
* information about dictionary about the domain
|
||||
*/
|
||||
private List<KnowledgeInfoReq> knowledgeInfos;
|
||||
|
||||
private KnowledgeAdvancedConfig globalKnowledgeConfig;
|
||||
|
||||
private ChatDefaultRichConfigResp chatDefaultConfig;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.request.ChatAggConfigReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.ChatDetailConfigReq;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.RecommendedQuestionReq;
|
||||
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChatConfigResp {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long domainId;
|
||||
|
||||
private ChatDetailConfigReq chatDetailConfig;
|
||||
|
||||
private ChatAggConfigReq chatAggConfig;
|
||||
|
||||
private List<RecommendedQuestionReq> recommendedQuestions;
|
||||
|
||||
/**
|
||||
* available status
|
||||
*/
|
||||
private StatusEnum statusEnum;
|
||||
|
||||
private String createdBy;
|
||||
private String updatedBy;
|
||||
private Date createdAt;
|
||||
private Date updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.request.RecommendedQuestionReq;
|
||||
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChatConfigRichResp {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long domainId;
|
||||
|
||||
private String domainName;
|
||||
private String bizName;
|
||||
|
||||
private ChatAggRichConfigResp chatAggRichConfig;
|
||||
|
||||
private ChatDetailRichConfigResp chatDetailRichConfig;
|
||||
|
||||
private List<RecommendedQuestionReq> recommendedQuestions;
|
||||
|
||||
/**
|
||||
* available status
|
||||
*/
|
||||
private StatusEnum statusEnum;
|
||||
|
||||
private String createdBy;
|
||||
private String updatedBy;
|
||||
private Date createdAt;
|
||||
private Date updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.SchemaElement;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.ChatDefaultConfigReq;
|
||||
import com.tencent.supersonic.common.pojo.Constants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatDefaultRichConfigResp {
|
||||
|
||||
private List<SchemaElement> dimensions;
|
||||
private List<SchemaElement> metrics;
|
||||
|
||||
|
||||
/**
|
||||
* default time span unit
|
||||
*/
|
||||
private Integer unit = 1;
|
||||
|
||||
/**
|
||||
* default time type: day
|
||||
* DAY, WEEK, MONTH, YEAR
|
||||
*/
|
||||
private String period = Constants.DAY;
|
||||
|
||||
private ChatDefaultConfigReq.TimeMode timeMode;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.request.KnowledgeAdvancedConfig;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.KnowledgeInfoReq;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ChatDetailRichConfigResp {
|
||||
|
||||
/**
|
||||
* invisible dimensions/metrics
|
||||
*/
|
||||
private ItemVisibilityInfo visibility;
|
||||
|
||||
/**
|
||||
* information about dictionary about the domain
|
||||
*/
|
||||
private List<KnowledgeInfoReq> knowledgeInfos;
|
||||
|
||||
private KnowledgeAdvancedConfig globalKnowledgeConfig;
|
||||
|
||||
private ChatDefaultRichConfigResp chatDefaultConfig;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.SchemaElement;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EntityRichInfoResp {
|
||||
/**
|
||||
* entity alias
|
||||
*/
|
||||
private List<String> names;
|
||||
|
||||
private SchemaElement dimItem;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ItemVisibilityInfo {
|
||||
|
||||
private List<Long> blackDimIdList;
|
||||
private List<Long> blackMetricIdList;
|
||||
private List<Long> whiteDimIdList;
|
||||
private List<Long> whiteMetricIdList;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
||||
public class MetricInfo {
|
||||
|
||||
private String name;
|
||||
private String dimension;
|
||||
private String value;
|
||||
private String date;
|
||||
private Map<String, String> statistics;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.SemanticParseInfo;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Getter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ParseResp {
|
||||
private Integer chatId;
|
||||
private String queryText;
|
||||
private ParseState state;
|
||||
private List<SemanticParseInfo> selectedParses;
|
||||
private List<SemanticParseInfo> candidateParses;
|
||||
|
||||
public enum ParseState {
|
||||
COMPLETED,
|
||||
PENDING,
|
||||
FAILED
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryResponse {
|
||||
public class QueryResp {
|
||||
|
||||
private Long questionId;
|
||||
private Date createTime;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.tencent.supersonic.chat.api.pojo.response;
|
||||
|
||||
import com.tencent.supersonic.chat.api.pojo.request.RecommendedQuestion;
|
||||
import com.tencent.supersonic.chat.api.pojo.request.RecommendedQuestionReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class RecommendQuestion {
|
||||
public class RecommendQuestionResp {
|
||||
private Long domainId;
|
||||
private List<RecommendedQuestion> recommendedQuestions;
|
||||
private List<RecommendedQuestionReq> recommendedQuestions;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RecommendResponse {
|
||||
public class RecommendResp {
|
||||
private List<SchemaElement> dimensions;
|
||||
private List<SchemaElement> metrics;
|
||||
}
|
||||
@@ -6,11 +6,11 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Data
|
||||
public class SearchResponse {
|
||||
public class SearchResp {
|
||||
|
||||
private List<SearchResult> searchResults;
|
||||
|
||||
public SearchResponse(List<SearchResult> searchResults) {
|
||||
public SearchResp(List<SearchResult> searchResults) {
|
||||
this.searchResults = searchResults;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user