(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:
LXW
2024-06-03 21:18:32 +08:00
committed by GitHub
parent 5e9c960263
commit 4648e8d875
20 changed files with 69 additions and 2953 deletions

View File

@@ -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("包含艺人相关标签和指标信息");

View File

@@ -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("包含超音数访问统计相关的指标和维度等");

View File

@@ -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);

View File

@@ -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`)
);

View File

@@ -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;

View File

@@ -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

View File

@@ -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`)
);