feat(agent):Optimize the agent architecture, support gptsapp to be bound as a sub-agent, and strip vis to become an extended component.

This commit is contained in:
yhjun1026
2025-04-21 11:39:37 +08:00
parent 129509fcd2
commit e65cf4d83f
65 changed files with 3463 additions and 830 deletions

View File

@@ -245,12 +245,19 @@ CREATE TABLE IF NOT EXISTS `gpts_instance` (
UNIQUE KEY `uk_gpts` (`gpts_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT="gpts instance";
CREATE TABLE `gpts_messages` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`conv_id` varchar(255) NOT NULL COMMENT 'The unique id of the conversation record',
`message_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'message id',
`sender` varchar(255) NOT NULL COMMENT 'Who speaking in the current conversation turn',
`receiver` varchar(255) NOT NULL COMMENT 'Who receive message in the current conversation turn',
`sender_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) speaking in the current conversation turn',
`receiver_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) receive message in the current conversation turn',
`avatar` varchar(255) DEFAULT '' COMMENT 'Who(avatar) send message in the current conversation turn',
`model_name` varchar(255) DEFAULT NULL COMMENT 'message generate model',
`thinking` longtext DEFAULT NULL COMMENT 'llm thinking text',
`show_message` tinyint(4) DEFAULT NULL COMMENT 'Whether the current message needs to be displayed to the user',
`rounds` int(11) NOT NULL COMMENT 'dialogue turns',
`is_success` int(4) NULL DEFAULT 0 COMMENT 'agent message is success',
`app_code` varchar(255) NOT NULL COMMENT 'Current AI assistant code',
@@ -264,6 +271,12 @@ CREATE TABLE `gpts_messages` (
`role` varchar(255) DEFAULT NULL COMMENT 'The role of the current message content',
`created_at` datetime DEFAULT NULL COMMENT 'create time',
`updated_at` datetime DEFAULT NULL COMMENT 'last update time',
`message_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'message id',
`thinking` longtext DEFAULT NULL COMMENT 'llm thinking text',
`show_message` tinyint(4) DEFAULT NULL COMMENT 'Whether the current message needs to be displayed to the user',
`sender_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) speaking in the current conversation turn',
`receiver_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Who(name) receive message in the current conversation turn',
`avatar` varchar(255) DEFAULT '' COMMENT 'Who(avatar) send message in the current conversation turn',
PRIMARY KEY (`id`),
KEY `idx_q_messages` (`conv_id`,`rounds`,`sender`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT="gpts message";
@@ -285,6 +298,12 @@ CREATE TABLE `gpts_plans` (
`result` longtext COMMENT 'subtask result',
`created_at` datetime DEFAULT NULL COMMENT 'create time',
`updated_at` datetime DEFAULT NULL COMMENT 'last update time',
`conv_round` int(11) NOT NULL DEFAULT '0' COMMENT 'the current conversation turn number',
`sub_task_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'the message task id',
`task_parent` varchar(255) DEFAULT '' COMMENT 'Subtask parent task i',
`action` text DEFAULT NULL COMMENT 'plan action',
`action_input` longtext DEFAULT NULL COMMENT 'plan action input',
`task_uid` varchar(255) NOT NULL DEFAULT '' COMMENT 'task uid';
PRIMARY KEY (`id`),
UNIQUE KEY `uk_sub_task` (`conv_id`,`sub_task_num`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT="gpt plan";