mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
(improvement)(Chat)The chat history also returns the time taken for parsing and SQL generation (#1084)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -165,7 +165,7 @@ public class S2ArtistDemo extends S2BaseDemo {
|
||||
|
||||
public long addDataSet(DomainResp singerDomain, DomainResp singerModelSet, ModelResp singerModel) {
|
||||
DataSetReq dataSetReq = new DataSetReq();
|
||||
dataSetReq.setName("艺人库");
|
||||
dataSetReq.setName("艺人库数据集");
|
||||
dataSetReq.setBizName("singer");
|
||||
dataSetReq.setDomainId(singerDomain.getId());
|
||||
dataSetReq.setDescription("包含艺人相关标签和指标信息");
|
||||
|
||||
@@ -92,7 +92,7 @@ public class S2VisitsDemo extends S2BaseDemo {
|
||||
|
||||
//create metrics and dimensions
|
||||
DimensionResp departmentDimension = getDimension("department", userModel);
|
||||
MetricResp metricUv = addMetric_uv(userModel, departmentDimension);
|
||||
MetricResp metricUv = addMetric_uv(pvUvModel, departmentDimension);
|
||||
MetricResp metricPv = getMetric("pv", pvUvModel);
|
||||
addMetric_pv_avg(metricPv, metricUv, departmentDimension, pvUvModel);
|
||||
|
||||
@@ -463,7 +463,7 @@ public class S2VisitsDemo extends S2BaseDemo {
|
||||
|
||||
public DataSetResp addDataSet(DomainResp s2Domain, DomainResp s2ModelSet) {
|
||||
DataSetReq dataSetReq = new DataSetReq();
|
||||
dataSetReq.setName("超音数");
|
||||
dataSetReq.setName("超音数数据集");
|
||||
dataSetReq.setBizName("s2");
|
||||
dataSetReq.setDomainId(s2Domain.getId());
|
||||
dataSetReq.setDescription("包含超音数访问统计相关的指标和维度等");
|
||||
|
||||
@@ -316,4 +316,7 @@ alter table s2_agent add column `multi_turn_config` varchar(2000) COLLATE utf8_u
|
||||
alter table s2_model add column `ext` varchar(1000) DEFAULT NULL;
|
||||
|
||||
--20240601
|
||||
alter table s2_sys_parameter rename to s2_system_config;
|
||||
alter table s2_sys_parameter rename to s2_system_config;
|
||||
|
||||
--20240603
|
||||
alter table s2_chat_query add column `parse_time_cost` varchar(1024);
|
||||
@@ -38,6 +38,7 @@ CREATE TABLE IF NOT EXISTS `s2_chat_query`
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`similar_queries` varchar(1024) DEFAULT '',
|
||||
`parse_time_cost` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
);
|
||||
|
||||
|
||||
@@ -171,6 +171,7 @@ CREATE TABLE `s2_chat_query`
|
||||
`score` int(11) DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`similar_queries` varchar(1024) DEFAULT '',
|
||||
`parse_time_cost` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8;
|
||||
|
||||
|
||||
@@ -23,12 +23,12 @@ public class MetaDiscoveryTest extends BaseTest {
|
||||
queryMapReq.setQueryText("对比alice和lucy的访问次数");
|
||||
queryMapReq.setTopN(10);
|
||||
queryMapReq.setUser(User.getFakeUser());
|
||||
queryMapReq.setDataSetNames(Collections.singletonList("超音数"));
|
||||
queryMapReq.setDataSetNames(Collections.singletonList("超音数数据集"));
|
||||
MapInfoResp mapMeta = metaDiscoveryService.getMapMeta(queryMapReq);
|
||||
|
||||
Assertions.assertNotNull(mapMeta);
|
||||
Assertions.assertNotEquals(0, mapMeta.getDataSetMapInfo().get("超音数").getMapFields());
|
||||
Assertions.assertNotEquals(0, mapMeta.getDataSetMapInfo().get("超音数").getTopFields());
|
||||
Assertions.assertNotEquals(0, mapMeta.getDataSetMapInfo().get("超音数数据集").getMapFields());
|
||||
Assertions.assertNotEquals(0, mapMeta.getDataSetMapInfo().get("超音数数据集").getTopFields());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -38,6 +38,7 @@ CREATE TABLE IF NOT EXISTS `s2_chat_query`
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`similar_queries` varchar(1024) DEFAULT '',
|
||||
`parse_time_cost` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user