mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 22:46:49 +00:00
[release][project] supersonic 0.7.3 version backend update (#40)
* [improvement] add some features * [improvement] revise CHANGELOG --------- Co-authored-by: zuopengge <hwzuopengge@tencent.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
binDir=$(cd "$(dirname "$0")"; pwd)
|
||||
baseDir=$(cd "$sbinDir/.." && pwd -P)
|
||||
baseDir=$(readlink -f $binDir/../)
|
||||
libDir=$baseDir/lib
|
||||
confDir=$baseDir/conf
|
||||
webDir=$baseDir/webapp
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
binDir=$(cd "$(dirname "$0")"; pwd)
|
||||
baseDir=$(cd "$sbinDir/.." && pwd -P)
|
||||
baseDir=$(readlink -f $binDir/../)
|
||||
confDir=$baseDir/conf
|
||||
source ${baseDir}/bin/env.sh
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ com.tencent.supersonic.chat.api.component.SchemaMapper=\
|
||||
com.tencent.supersonic.chat.mapper.FuzzyNameMapper, \
|
||||
com.tencent.supersonic.chat.mapper.QueryFilterMapper, \
|
||||
com.tencent.supersonic.chat.mapper.EntityMapper
|
||||
|
||||
com.tencent.supersonic.chat.api.component.SemanticParser=\
|
||||
com.tencent.supersonic.chat.parser.rule.QueryModeParser, \
|
||||
com.tencent.supersonic.chat.parser.rule.ContextInheritParser, \
|
||||
@@ -10,23 +11,30 @@ com.tencent.supersonic.chat.api.component.SemanticParser=\
|
||||
com.tencent.supersonic.chat.parser.rule.TimeRangeParser, \
|
||||
com.tencent.supersonic.chat.parser.rule.AggregateTypeParser, \
|
||||
com.tencent.supersonic.chat.parser.llm.dsl.LLMDSLParser, \
|
||||
com.tencent.supersonic.chat.parser.function.FunctionBasedParser
|
||||
com.tencent.supersonic.chat.parser.plugin.function.FunctionBasedParser
|
||||
|
||||
|
||||
com.tencent.supersonic.chat.api.component.SemanticLayer=\
|
||||
com.tencent.supersonic.knowledge.semantic.RemoteSemanticLayer
|
||||
|
||||
com.tencent.supersonic.chat.query.QuerySelector=\
|
||||
com.tencent.supersonic.chat.query.HeuristicQuerySelector
|
||||
com.tencent.supersonic.chat.parser.function.ModelResolver=\
|
||||
com.tencent.supersonic.chat.parser.function.HeuristicModelResolver
|
||||
|
||||
com.tencent.supersonic.chat.parser.plugin.function.ModelResolver=\
|
||||
com.tencent.supersonic.chat.parser.plugin.function.HeuristicModelResolver
|
||||
|
||||
com.tencent.supersonic.auth.authentication.interceptor.AuthenticationInterceptor=\
|
||||
com.tencent.supersonic.auth.authentication.interceptor.DefaultAuthenticationInterceptor
|
||||
|
||||
com.tencent.supersonic.auth.api.authentication.adaptor.UserAdaptor=\
|
||||
com.tencent.supersonic.auth.authentication.adaptor.DefaultUserAdaptor
|
||||
|
||||
|
||||
com.tencent.supersonic.chat.api.component.DSLOptimizer=\
|
||||
com.tencent.supersonic.chat.query.dsl.optimizer.DateFieldCorrector, \
|
||||
com.tencent.supersonic.chat.query.dsl.optimizer.FieldCorrector, \
|
||||
com.tencent.supersonic.chat.query.dsl.optimizer.FunctionCorrector, \
|
||||
com.tencent.supersonic.chat.query.dsl.optimizer.TableNameCorrector, \
|
||||
com.tencent.supersonic.chat.query.dsl.optimizer.QueryFilterAppend, \
|
||||
com.tencent.supersonic.chat.query.dsl.optimizer.SelectFieldAppendCorrector
|
||||
com.tencent.supersonic.chat.api.component.SemanticCorrector=\
|
||||
com.tencent.supersonic.chat.corrector.DateFieldCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.FieldValueCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.FieldCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.FunctionCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.TableNameCorrector, \
|
||||
com.tencent.supersonic.chat.corrector.QueryFilterAppend, \
|
||||
com.tencent.supersonic.chat.corrector.SelectFieldAppendCorrector
|
||||
|
||||
@@ -1,116 +1,80 @@
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat_context`
|
||||
(
|
||||
`chat_id`
|
||||
BIGINT
|
||||
NOT
|
||||
NULL, -- context chat id
|
||||
`modified_at`
|
||||
TIMESTAMP
|
||||
NOT
|
||||
NULL
|
||||
DEFAULT
|
||||
CURRENT_TIMESTAMP
|
||||
ON
|
||||
UPDATE
|
||||
CURRENT_TIMESTAMP, -- row modify time
|
||||
`user`
|
||||
varchar
|
||||
(
|
||||
64
|
||||
) DEFAULT NULL , -- row modify user
|
||||
`query_text` LONGVARCHAR DEFAULT NULL , -- query text
|
||||
`chat_id` BIGINT NOT NULL , -- context chat id
|
||||
`modified_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , -- row modify time
|
||||
`user` varchar(64) DEFAULT NULL , -- row modify user
|
||||
`query_text` LONGVARCHAR DEFAULT NULL , -- query text
|
||||
`semantic_parse` LONGVARCHAR DEFAULT NULL , -- parse data
|
||||
`ext_data` LONGVARCHAR DEFAULT NULL , -- extend data
|
||||
PRIMARY KEY
|
||||
(
|
||||
`chat_id`
|
||||
)
|
||||
);
|
||||
`ext_data` LONGVARCHAR DEFAULT NULL , -- extend data
|
||||
PRIMARY KEY (`chat_id`)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat`
|
||||
(
|
||||
`chat_id`
|
||||
BIGINT
|
||||
auto_increment,-- AUTO_INCREMENT,
|
||||
`chat_name`
|
||||
varchar
|
||||
(
|
||||
100
|
||||
) DEFAULT NULL,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
|
||||
`last_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
ON UPDATE CURRENT_TIMESTAMP ,
|
||||
`creator` varchar
|
||||
(
|
||||
30
|
||||
) DEFAULT NULL,
|
||||
`last_question` varchar
|
||||
(
|
||||
200
|
||||
) DEFAULT NULL,
|
||||
`is_delete` INT DEFAULT '0' COMMENT 'is deleted',
|
||||
`is_top` INT DEFAULT '0' COMMENT 'is top',
|
||||
PRIMARY KEY
|
||||
(
|
||||
`chat_id`
|
||||
)
|
||||
);
|
||||
`chat_id` BIGINT auto_increment ,-- AUTO_INCREMENT,
|
||||
`chat_name` varchar(100) DEFAULT NULL,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
|
||||
`last_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
|
||||
`creator` varchar(30) DEFAULT NULL,
|
||||
`last_question` varchar(200) DEFAULT NULL,
|
||||
`is_delete` INT DEFAULT '0' COMMENT 'is deleted',
|
||||
`is_top` INT DEFAULT '0' COMMENT 'is top',
|
||||
PRIMARY KEY (`chat_id`)
|
||||
) ;
|
||||
|
||||
|
||||
CREATE TABLE `s2_chat_query`
|
||||
(
|
||||
`question_id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`query_text` mediumtext,
|
||||
`user_name` varchar(150) DEFAULT NULL COMMENT '',
|
||||
`query_state` int(1) DEFAULT NULL,
|
||||
`chat_id` BIGINT NOT NULL, -- context chat id
|
||||
`query_response` mediumtext NOT NULL,
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
`question_id` BIGINT NOT NULL AUTO_INCREMENT,
|
||||
`agent_id` INT NULL,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`query_text` mediumtext,
|
||||
`user_name` varchar(150) DEFAULT NULL COMMENT '',
|
||||
`query_state` int(1) DEFAULT NULL,
|
||||
`chat_id` BIGINT NOT NULL , -- context chat id
|
||||
`query_result` mediumtext NOT NULL ,
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`question_id`)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat_config`
|
||||
CREATE TABLE `s2_chat_parse`
|
||||
(
|
||||
`id`
|
||||
INT
|
||||
NOT
|
||||
NULL
|
||||
AUTO_INCREMENT,
|
||||
`domain_id`
|
||||
INT
|
||||
DEFAULT
|
||||
NULL,
|
||||
`chat_detail_config`
|
||||
varchar
|
||||
`question_id` BIGINT NOT NULL,
|
||||
`chat_id` BIGINT NOT NULL ,
|
||||
`parse_id` INT NOT NULL ,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`query_text` varchar(500),
|
||||
`user_name` varchar(150) DEFAULT NULL COMMENT '',
|
||||
`parse_info` mediumtext NOT NULL ,
|
||||
`is_candidate` INT DEFAULT 1 COMMENT '1是candidate,0是selected'
|
||||
);
|
||||
|
||||
CREATE TABLE `s2_chat_statistics`
|
||||
(
|
||||
655
|
||||
) ,
|
||||
`chat_agg_config` varchar
|
||||
(
|
||||
655
|
||||
) ,
|
||||
`recommended_questions` varchar
|
||||
(
|
||||
1500
|
||||
) ,
|
||||
`created_at` TIMESTAMP NOT NULL ,
|
||||
`updated_at` TIMESTAMP NOT NULL ,
|
||||
`created_by` varchar
|
||||
(
|
||||
100
|
||||
) NOT NULL ,
|
||||
`updated_by` varchar
|
||||
(
|
||||
100
|
||||
) NOT NULL ,
|
||||
`status` INT NOT NULL DEFAULT '0' , -- domain extension information status : 0 is normal, 1 is off the shelf, 2 is deleted
|
||||
PRIMARY KEY
|
||||
(
|
||||
`id`
|
||||
)
|
||||
);
|
||||
`question_id` BIGINT NOT NULL,
|
||||
`chat_id` BIGINT NOT NULL ,
|
||||
`user_name` varchar(150) DEFAULT NULL COMMENT '',
|
||||
`query_text` varchar(200),
|
||||
`interface_name` varchar(100) DEFAULT NULL COMMENT '',
|
||||
`cost` INT(6) NOT NULL ,
|
||||
`type` INT NOT NULL ,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat_config` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`domain_id` INT DEFAULT NULL ,
|
||||
`chat_detail_config` varchar(655) ,
|
||||
`chat_agg_config` varchar(655) ,
|
||||
`recommended_questions` varchar(1500) ,
|
||||
`created_at` TIMESTAMP NOT NULL ,
|
||||
`updated_at` TIMESTAMP NOT NULL ,
|
||||
`created_by` varchar(100) NOT NULL ,
|
||||
`updated_by` varchar(100) NOT NULL ,
|
||||
`status` INT NOT NULL DEFAULT '0' , -- domain extension information status : 0 is normal, 1 is off the shelf, 2 is deleted
|
||||
PRIMARY KEY (`id`)
|
||||
) ;
|
||||
|
||||
|
||||
-- CREATE TABLE IF NOT EXISTS `s2_chat_config` (
|
||||
@@ -127,150 +91,69 @@ CREATE TABLE IF NOT EXISTS `s2_chat_config`
|
||||
-- `status` INT NOT NULL DEFAULT '0' , -- domain extension information status : 0 is normal, 1 is off the shelf, 2 is deleted
|
||||
-- PRIMARY KEY (`id`)
|
||||
-- ) ;
|
||||
COMMENT
|
||||
ON TABLE s2_chat_config IS 'chat config information table ';
|
||||
COMMENT ON TABLE s2_chat_config IS 'chat config information table ';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_dictionary`
|
||||
(
|
||||
`id`
|
||||
INT
|
||||
NOT
|
||||
NULL
|
||||
AUTO_INCREMENT,
|
||||
`domain_id`
|
||||
INT
|
||||
NOT
|
||||
NULL,
|
||||
`dim_value_infos`
|
||||
LONGVARCHAR, -- dimension value setting information
|
||||
`created_at`
|
||||
TIMESTAMP
|
||||
NOT
|
||||
NULL,
|
||||
`updated_at`
|
||||
TIMESTAMP
|
||||
NOT
|
||||
NULL,
|
||||
`created_by`
|
||||
varchar
|
||||
(
|
||||
100
|
||||
) NOT NULL ,
|
||||
`updated_by` varchar
|
||||
(
|
||||
100
|
||||
) DEFAULT NULL ,
|
||||
`status` INT NOT NULL DEFAULT '0' , -- domain extension information status : 0 is normal, 1 is off the shelf, 2 is deleted
|
||||
PRIMARY KEY
|
||||
(
|
||||
`id`
|
||||
),
|
||||
UNIQUE
|
||||
(
|
||||
domain_id
|
||||
)
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_dictionary` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`domain_id` INT NOT NULL ,
|
||||
`dim_value_infos` LONGVARCHAR , -- dimension value setting information
|
||||
`created_at` TIMESTAMP NOT NULL ,
|
||||
`updated_at` TIMESTAMP NOT NULL ,
|
||||
`created_by` varchar(100) NOT NULL ,
|
||||
`updated_by` varchar(100) DEFAULT NULL ,
|
||||
`status` INT NOT NULL DEFAULT '0' , -- domain extension information status : 0 is normal, 1 is off the shelf, 2 is deleted
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE (domain_id)
|
||||
);
|
||||
COMMENT
|
||||
ON TABLE s2_dictionary IS 'dictionary configuration information table';
|
||||
COMMENT ON TABLE s2_dictionary IS 'dictionary configuration information table';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_dictionary_task`
|
||||
(
|
||||
`id`
|
||||
INT
|
||||
NOT
|
||||
NULL
|
||||
AUTO_INCREMENT,
|
||||
`name`
|
||||
varchar
|
||||
(
|
||||
255
|
||||
) NOT NULL , -- task name
|
||||
`description` varchar
|
||||
(
|
||||
255
|
||||
) ,
|
||||
`command` LONGVARCHAR NOT NULL , -- task Request Parameters
|
||||
`command_md5` varchar
|
||||
(
|
||||
255
|
||||
) NOT NULL , -- task Request Parameters md5
|
||||
`status` INT NOT NULL , -- the final status of the task
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
|
||||
`created_by` varchar
|
||||
(
|
||||
100
|
||||
) NOT NULL ,
|
||||
`progress` DOUBLE default 0.00 , -- task real-time progress
|
||||
`elapsed_ms` bigINT DEFAULT NULL , -- the task takes time in milliseconds
|
||||
`message` LONGVARCHAR , -- remark related information
|
||||
PRIMARY KEY
|
||||
(
|
||||
`id`
|
||||
)
|
||||
);
|
||||
COMMENT
|
||||
ON TABLE s2_dictionary_task IS 'dictionary task information table';
|
||||
CREATE TABLE IF NOT EXISTS `s2_dictionary_task` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL , -- task name
|
||||
`description` varchar(255) ,
|
||||
`command`LONGVARCHAR NOT NULL , -- task Request Parameters
|
||||
`command_md5` varchar(255) NOT NULL , -- task Request Parameters md5
|
||||
`status` INT NOT NULL , -- the final status of the task
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
|
||||
`created_by` varchar(100) NOT NULL ,
|
||||
`progress` DOUBLE default 0.00 , -- task real-time progress
|
||||
`elapsed_ms` bigINT DEFAULT NULL , -- the task takes time in milliseconds
|
||||
`message` LONGVARCHAR , -- remark related information
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT ON TABLE s2_dictionary_task IS 'dictionary task information table';
|
||||
|
||||
|
||||
create table s2_user
|
||||
(
|
||||
id INT AUTO_INCREMENT,
|
||||
name varchar(100) not null,
|
||||
id INT AUTO_INCREMENT,
|
||||
name varchar(100) not null,
|
||||
display_name varchar(100) null,
|
||||
password varchar(100) null,
|
||||
email varchar(100) null,
|
||||
password varchar(100) null,
|
||||
email varchar(100) null,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
COMMENT
|
||||
ON TABLE s2_user IS 'user information table';
|
||||
COMMENT ON TABLE s2_user IS 'user information table';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_plugin`
|
||||
(
|
||||
`id`
|
||||
INT
|
||||
AUTO_INCREMENT,
|
||||
`type`
|
||||
varchar
|
||||
(
|
||||
50
|
||||
) NULL,
|
||||
`domain` varchar
|
||||
(
|
||||
100
|
||||
) NULL,
|
||||
`pattern` varchar
|
||||
(
|
||||
500
|
||||
) NULL,
|
||||
`parse_mode` varchar
|
||||
(
|
||||
100
|
||||
) NULL,
|
||||
`parse_mode_config` LONGVARCHAR NULL,
|
||||
`name` varchar
|
||||
(
|
||||
100
|
||||
) NULL,
|
||||
`created_at` TIMESTAMP NULL,
|
||||
`created_by` varchar
|
||||
(
|
||||
100
|
||||
) null,
|
||||
`updated_at` TIMESTAMP NULL,
|
||||
`updated_by` varchar
|
||||
(
|
||||
100
|
||||
) NULL,
|
||||
`config` LONGVARCHAR NULL,
|
||||
`comment` LONGVARCHAR NULL,
|
||||
PRIMARY KEY
|
||||
(
|
||||
`id`
|
||||
)
|
||||
);
|
||||
COMMENT
|
||||
ON TABLE s2_plugin IS 'plugin information table';
|
||||
`id` INT AUTO_INCREMENT,
|
||||
`type` varchar(50) NULL,
|
||||
`domain` varchar(100) NULL,
|
||||
`pattern` varchar(500) NULL,
|
||||
`parse_mode` varchar(100) NULL,
|
||||
`parse_mode_config` LONGVARCHAR NULL,
|
||||
`name` varchar(100) NULL,
|
||||
`created_at` TIMESTAMP NULL,
|
||||
`created_by` varchar(100) null,
|
||||
`updated_at` TIMESTAMP NULL,
|
||||
`updated_by` varchar(100) NULL,
|
||||
`config` LONGVARCHAR NULL,
|
||||
`comment` LONGVARCHAR NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
); COMMENT ON TABLE s2_plugin IS 'plugin information table';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user