redis缓存替换+pgvector向量替换
This commit is contained in:
16
init/create_db.sql
Normal file
16
init/create_db.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
create database ai_chat default charset utf8mb4;
|
||||
use ai_chat;
|
||||
|
||||
|
||||
CREATE TABLE `chat_records` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||
`user_msg` text,
|
||||
`user_msg_tokens` int NOT NULL DEFAULT '0',
|
||||
`user_msg_keywords` varchar(1024) NOT NULL DEFAULT '',
|
||||
`ai_msg` text,
|
||||
`ai_msg_tokens` int NOT NULL DEFAULT '0',
|
||||
`req_tokens` int NOT NULL DEFAULT '0',
|
||||
`create_at` bigint NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `index_create_at` (`create_at` DESC)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
|
||||
Reference in New Issue
Block a user