mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-19 08:50:57 +00:00
(feature)(chat&common)Introduce ChatMemory module to support dynamic few-shot exemplars.#1097
This commit is contained in:
@@ -172,6 +172,7 @@ public abstract class S2BaseDemo implements CommandLineRunner {
|
||||
executeReq.setQueryText(queryText);
|
||||
executeReq.setChatId(parseResp.getChatId());
|
||||
executeReq.setUser(User.getFakeUser());
|
||||
executeReq.setAgentId(agentId);
|
||||
executeReq.setSaveAnswer(true);
|
||||
chatService.performExecution(executeReq);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,25 @@ CREATE TABLE IF NOT EXISTS `s2_chat_config` (
|
||||
COMMENT ON TABLE s2_chat_config IS 'chat config information table ';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat_memory` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`question` varchar(655) ,
|
||||
`agent_id` INT ,
|
||||
`db_schema` TEXT ,
|
||||
`s2_sql` TEXT ,
|
||||
`status` char(10) ,
|
||||
`llm_review` char(10) ,
|
||||
`llm_comment` TEXT,
|
||||
`human_review` char(10) ,
|
||||
`human_comment` TEXT ,
|
||||
`created_at` TIMESTAMP ,
|
||||
`updated_at` TIMESTAMP ,
|
||||
`created_by` varchar(100) ,
|
||||
`updated_by` varchar(100) ,
|
||||
PRIMARY KEY (`id`)
|
||||
) ;
|
||||
COMMENT ON TABLE s2_chat_memory IS 'chat memory table ';
|
||||
|
||||
create table IF NOT EXISTS s2_user
|
||||
(
|
||||
id INT AUTO_INCREMENT,
|
||||
|
||||
@@ -136,6 +136,24 @@ CREATE TABLE `s2_chat_config` (
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='主题域扩展信息表';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat_memory` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`question` varchar(655) ,
|
||||
`agent_id` INT ,
|
||||
`db_schema` TEXT ,
|
||||
`s2_sql` TEXT ,
|
||||
`status` char(10) ,
|
||||
`llm_review` char(10) ,
|
||||
`llm_comment` TEXT,
|
||||
`human_review` char(10) ,
|
||||
`human_comment` TEXT ,
|
||||
`created_at` TIMESTAMP NOT NULL ,
|
||||
`updated_at` TIMESTAMP NOT NULL ,
|
||||
`created_by` varchar(100) NOT NULL ,
|
||||
`updated_by` varchar(100) NOT NULL ,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `s2_chat_context` (
|
||||
`chat_id` bigint(20) NOT NULL COMMENT 'context chat id',
|
||||
`modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'row modify time',
|
||||
|
||||
@@ -82,6 +82,24 @@ CREATE TABLE IF NOT EXISTS `s2_chat_config` (
|
||||
) ;
|
||||
COMMENT ON TABLE s2_chat_config IS 'chat config information table ';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `s2_chat_memory` (
|
||||
`id` INT NOT NULL AUTO_INCREMENT,
|
||||
`question` varchar(655) ,
|
||||
`agent_id` INT ,
|
||||
`db_schema` TEXT ,
|
||||
`s2_sql` TEXT ,
|
||||
`status` char(10) ,
|
||||
`llm_review` char(10) ,
|
||||
`llm_comment` TEXT,
|
||||
`human_review` char(10) ,
|
||||
`human_comment` TEXT ,
|
||||
`created_at` TIMESTAMP ,
|
||||
`updated_at` TIMESTAMP ,
|
||||
`created_by` varchar(100) ,
|
||||
`updated_by` varchar(100) ,
|
||||
PRIMARY KEY (`id`)
|
||||
) ;
|
||||
COMMENT ON TABLE s2_chat_memory IS 'chat memory table ';
|
||||
|
||||
create table IF NOT EXISTS s2_user
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user