mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-24 10:27:28 +08:00
(improvement)(chat) Add DrillDownDimensionProcessor and SimilarQueryProcessor to obtain recommended dimensions and similar queries (#511)
Co-authored-by: jolunoluo
This commit is contained in:
@@ -27,7 +27,8 @@ com.tencent.supersonic.chat.processor.parse.ParseResultProcessor=\
|
||||
com.tencent.supersonic.chat.processor.parse.EntityInfoProcessor, \
|
||||
com.tencent.supersonic.chat.processor.parse.SqlInfoProcessor, \
|
||||
com.tencent.supersonic.chat.processor.parse.TimeCostProcessor, \
|
||||
com.tencent.supersonic.chat.processor.parse.RespBuildProcessor
|
||||
com.tencent.supersonic.chat.processor.parse.RespBuildProcessor, \
|
||||
com.tencent.supersonic.chat.processor.parse.SimilarQueryProcessor
|
||||
|
||||
com.tencent.supersonic.chat.api.component.SemanticInterpreter=\
|
||||
com.tencent.supersonic.knowledge.semantic.LocalSemanticInterpreter
|
||||
@@ -42,7 +43,8 @@ com.tencent.supersonic.auth.api.authentication.adaptor.UserAdaptor=\
|
||||
com.tencent.supersonic.auth.authentication.adaptor.DefaultUserAdaptor
|
||||
|
||||
com.tencent.supersonic.chat.processor.execute.ExecuteResultProcessor=\
|
||||
com.tencent.supersonic.chat.processor.execute.SimilarMetricProcessor
|
||||
com.tencent.supersonic.chat.processor.execute.SimilarMetricProcessor,\
|
||||
com.tencent.supersonic.chat.processor.execute.DimensionRecommendProcessor
|
||||
|
||||
com.tencent.supersonic.common.util.embedding.S2EmbeddingStore=\
|
||||
com.tencent.supersonic.common.util.embedding.InMemoryS2EmbeddingStore
|
||||
@@ -37,6 +37,7 @@ CREATE TABLE `s2_chat_query`
|
||||
`query_result` mediumtext NOT NULL ,
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`similar_queries` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
);
|
||||
|
||||
|
||||
@@ -157,19 +157,21 @@ CREATE TABLE `s2_chat_parse` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
|
||||
CREATE TABLE `s2_chat_query` (
|
||||
`question_id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` int(11) DEFAULT NULL,
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`query_text` mediumtext,
|
||||
`user_name` varchar(150) DEFAULT NULL,
|
||||
`query_state` int(1) DEFAULT NULL,
|
||||
`chat_id` bigint(20) NOT NULL,
|
||||
`query_result` mediumtext,
|
||||
`score` int(11) DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `s2_chat_query`
|
||||
(
|
||||
`question_id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` int(11) DEFAULT NULL,
|
||||
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`query_text` mediumtext,
|
||||
`user_name` varchar(150) DEFAULT NULL,
|
||||
`query_state` int(1) DEFAULT NULL,
|
||||
`chat_id` bigint(20) NOT NULL,
|
||||
`query_result` mediumtext,
|
||||
`score` int(11) DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`similar_queries` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET = utf8;
|
||||
|
||||
|
||||
CREATE TABLE `s2_chat_statistics` (
|
||||
|
||||
@@ -142,4 +142,7 @@ CREATE TABLE `s2_metric_query_default_config`
|
||||
`updated_at` datetime null,
|
||||
`created_by` varchar(100) null,
|
||||
`updated_by` varchar(100) null
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
--20231214
|
||||
alter table s2_chat_query add column `similar_queries` varchar(1024) DEFAULT '';
|
||||
@@ -37,6 +37,7 @@ CREATE TABLE `s2_chat_query`
|
||||
`query_result` mediumtext NOT NULL ,
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`similar_queries` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
);
|
||||
|
||||
@@ -200,6 +201,7 @@ CREATE TABLE IF NOT EXISTS `s2_metric` (
|
||||
`alias` varchar(500) DEFAULT NULL,
|
||||
`tags` varchar(500) DEFAULT NULL,
|
||||
`relate_dimensions` varchar(500) DEFAULT NULL,
|
||||
`ext` LONGVARCHAR DEFAULT NULL ,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_metric IS 'metric information table';
|
||||
@@ -530,4 +532,16 @@ CREATE TABLE s2_sys_parameter
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
admin varchar(500),
|
||||
parameters text null
|
||||
);
|
||||
|
||||
CREATE TABLE `s2_metric_query_default_config`(
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`metric_id` bigint,
|
||||
`user_name` varchar(255) NOT NULL,
|
||||
`default_config` varchar(1000) NOT NULL,
|
||||
`created_at` TIMESTAMP null,
|
||||
`updated_at` TIMESTAMP null,
|
||||
`created_by` varchar(100) null,
|
||||
`updated_by` varchar(100) not null,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
Reference in New Issue
Block a user