mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-18 20:34:19 +08:00
(improvement)(Chat) Move chat-core to headless (#805)
Co-authored-by: jolunoluo
This commit is contained in:
17
headless/core/src/test/resources/application.yaml
Normal file
17
headless/core/src/test/resources/application.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
mybatis:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
|
||||
spring:
|
||||
h2:
|
||||
console:
|
||||
path: /h2-console/semantic
|
||||
# enabled web
|
||||
enabled: true
|
||||
datasource:
|
||||
driver-class-name: org.h2.Driver
|
||||
url: jdbc:h2:mem:semantic;DATABASE_TO_UPPER=false
|
||||
username: root
|
||||
password: semantic
|
||||
schema: classpath:db/chat-schema-h2.sql
|
||||
data: classpath:db/chat-data-h2.sql
|
||||
|
||||
2
headless/core/src/test/resources/data/README.url
Normal file
2
headless/core/src/test/resources/data/README.url
Normal file
@@ -0,0 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=https://github.com/hankcs/HanLP/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
tom _1_2 5
|
||||
alice _1_2 6
|
||||
lucy _1_2 4
|
||||
dean _1_2 2
|
||||
john _1_2 8
|
||||
jack _1_2 8
|
||||
1
headless/core/src/test/resources/data/version.txt
Normal file
1
headless/core/src/test/resources/data/version.txt
Normal file
@@ -0,0 +1 @@
|
||||
1.7.5
|
||||
1
headless/core/src/test/resources/db/chat-data-h2.sql
Normal file
1
headless/core/src/test/resources/db/chat-data-h2.sql
Normal file
@@ -0,0 +1 @@
|
||||
insert into chat_context (chat_id, modified_at , `user`, `query_text`, `semantic_parse` ,ext_data) VALUES(1, '2023-05-24 00:00:00', 'admin', '超音数访问次数', '', 'admin');
|
||||
59
headless/core/src/test/resources/db/chat-schema-h2.sql
Normal file
59
headless/core/src/test/resources/db/chat-schema-h2.sql
Normal file
@@ -0,0 +1,59 @@
|
||||
CREATE TABLE `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
|
||||
`semantic_parse` LONGVARCHAR DEFAULT NULL , -- parse data
|
||||
`ext_data` LONGVARCHAR DEFAULT NULL , -- extend data
|
||||
PRIMARY KEY (`chat_id`)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE `chat`
|
||||
(
|
||||
`chat_id` BIGINT NOT NULL ,-- 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 `chat_query`
|
||||
(
|
||||
`id` BIGINT NOT NULL ,--AUTO_INCREMENT,
|
||||
`question_id` BIGINT DEFAULT NULL,
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`user_name` varchar(150) DEFAULT NULL COMMENT '',
|
||||
`question` varchar(300) DEFAULT NULL COMMENT '',
|
||||
`query_result` LONGVARCHAR,
|
||||
`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
|
||||
`state` int(1) DEFAULT NULL,
|
||||
`data_content` varchar(30) DEFAULT NULL,
|
||||
`name` varchar(100) DEFAULT NULL,
|
||||
`scene_type` int(2) DEFAULT NULL,
|
||||
`query_type` int(2) DEFAULT NULL,
|
||||
`is_deleted` int(1) DEFAULT NULL,
|
||||
`module` varchar(30) DEFAULT NULL,
|
||||
`entity` LONGVARCHAR COMMENT '',
|
||||
`chat_id` BIGINT DEFAULT NULL COMMENT 'chat id',
|
||||
`recommend` text,
|
||||
`aggregator` varchar(20) DEFAULT 'trend',
|
||||
`top_num` int DEFAULT NULL,
|
||||
`start_time` varchar(30) DEFAULT NULL,
|
||||
`end_time` varchar(30) DEFAULT NULL,
|
||||
`compare_recommend` LONGVARCHAR,
|
||||
`compare_entity` LONGVARCHAR,
|
||||
`query_sql` LONGVARCHAR,
|
||||
`columns` varchar(2000) DEFAULT NULL,
|
||||
`result_list` LONGVARCHAR,
|
||||
`main_entity` varchar(5000) DEFAULT NULL,
|
||||
`semantic_text` varchar(5000) DEFAULT NULL,
|
||||
`score` int DEFAULT '0',
|
||||
`feedback` varchar(1024) DEFAULT '',
|
||||
PRIMARY KEY (`id`)
|
||||
) ;
|
||||
1
headless/core/src/test/resources/hanlp.properties
Normal file
1
headless/core/src/test/resources/hanlp.properties
Normal file
@@ -0,0 +1 @@
|
||||
CustomDictionaryPath=data/dictionary/custom/DimValue_1_2.txt
|
||||
Reference in New Issue
Block a user