feat: Support for Chat Flow & Agent Support for binding a single chat flow (#765)
Co-authored-by: Yu Yang <72337138+tomasyu985@users.noreply.github.com> Co-authored-by: zengxiaohui <csu.zengxiaohui@gmail.com> Co-authored-by: lijunwen.gigoo <lijunwen.gigoo@bytedance.com> Co-authored-by: lvxinyu.1117 <lvxinyu.1117@bytedance.com> Co-authored-by: liuyunchao.0510 <liuyunchao.0510@bytedance.com> Co-authored-by: haozhenfei <37089575+haozhenfei@users.noreply.github.com> Co-authored-by: July <jiangxujin@bytedance.com> Co-authored-by: tecvan-fe <fanwenjie.fe@bytedance.com>
This commit is contained in:
100
docker/atlas/migrations/20250718104121_update.sql
Normal file
100
docker/atlas/migrations/20250718104121_update.sql
Normal file
@@ -0,0 +1,100 @@
|
||||
-- Create "app_conversation_template_draft" table
|
||||
CREATE TABLE `opencoze`.`app_conversation_template_draft` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`app_id` bigint unsigned NOT NULL COMMENT "app id",
|
||||
`space_id` bigint unsigned NOT NULL COMMENT "space id",
|
||||
`name` varchar(256) NOT NULL COMMENT "conversation name",
|
||||
`template_id` bigint unsigned NOT NULL COMMENT "template id",
|
||||
`creator_id` bigint unsigned NOT NULL COMMENT "creator id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
`updated_at` bigint unsigned NULL COMMENT "update time in millisecond",
|
||||
`deleted_at` datetime(3) NULL COMMENT "delete time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_space_id_app_id_template_id` (`space_id`, `app_id`, `template_id`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
-- Create "app_conversation_template_online" table
|
||||
CREATE TABLE `opencoze`.`app_conversation_template_online` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`app_id` bigint unsigned NOT NULL COMMENT "app id",
|
||||
`space_id` bigint unsigned NOT NULL COMMENT "space id",
|
||||
`name` varchar(256) NOT NULL COMMENT "conversation name",
|
||||
`template_id` bigint unsigned NOT NULL COMMENT "template id",
|
||||
`version` varchar(256) NOT NULL COMMENT "version name",
|
||||
`creator_id` bigint unsigned NOT NULL COMMENT "creator id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_space_id_app_id_template_id_version` (`space_id`, `app_id`, `template_id`, `version`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
-- Create "app_dynamic_conversation_draft" table
|
||||
CREATE TABLE `opencoze`.`app_dynamic_conversation_draft` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`app_id` bigint unsigned NOT NULL COMMENT "app id",
|
||||
`name` varchar(256) NOT NULL COMMENT "conversation name",
|
||||
`user_id` bigint unsigned NOT NULL COMMENT "user id",
|
||||
`connector_id` bigint unsigned NOT NULL COMMENT "connector id",
|
||||
`conversation_id` bigint unsigned NOT NULL COMMENT "conversation id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
`deleted_at` datetime(3) NULL COMMENT "delete time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_app_id_connector_id_user_id` (`app_id`, `connector_id`, `user_id`),
|
||||
INDEX `idx_connector_id_user_id_name` (`connector_id`, `user_id`, `name`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
-- Create "app_dynamic_conversation_online" table
|
||||
CREATE TABLE `opencoze`.`app_dynamic_conversation_online` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`app_id` bigint unsigned NOT NULL COMMENT "app id",
|
||||
`name` varchar(256) NOT NULL COMMENT "conversation name",
|
||||
`user_id` bigint unsigned NOT NULL COMMENT "user id",
|
||||
`connector_id` bigint unsigned NOT NULL COMMENT "connector id",
|
||||
`conversation_id` bigint unsigned NOT NULL COMMENT "conversation id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
`deleted_at` datetime(3) NULL COMMENT "delete time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_app_id_connector_id_user_id` (`app_id`, `connector_id`, `user_id`),
|
||||
INDEX `idx_connector_id_user_id_name` (`connector_id`, `user_id`, `name`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
-- Create "app_static_conversation_draft" table
|
||||
CREATE TABLE `opencoze`.`app_static_conversation_draft` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`template_id` bigint unsigned NOT NULL COMMENT "template id",
|
||||
`user_id` bigint unsigned NOT NULL COMMENT "user id",
|
||||
`connector_id` bigint unsigned NOT NULL COMMENT "connector id",
|
||||
`conversation_id` bigint unsigned NOT NULL COMMENT "conversation id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
`deleted_at` datetime(3) NULL COMMENT "delete time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
-- Create "app_static_conversation_online" table
|
||||
CREATE TABLE `opencoze`.`app_static_conversation_online` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`template_id` bigint unsigned NOT NULL COMMENT "template id",
|
||||
`user_id` bigint unsigned NOT NULL COMMENT "user id",
|
||||
`connector_id` bigint unsigned NOT NULL COMMENT "connector id",
|
||||
`conversation_id` bigint unsigned NOT NULL COMMENT "conversation id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_connector_id_user_id_template_id` (`connector_id`, `user_id`, `template_id`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
-- Create "chat_flow_role_config" table
|
||||
CREATE TABLE `opencoze`.`chat_flow_role_config` (
|
||||
`id` bigint unsigned NOT NULL COMMENT "id",
|
||||
`workflow_id` bigint unsigned NOT NULL COMMENT "workflow id",
|
||||
`connector_id` bigint unsigned NULL COMMENT "connector id",
|
||||
`name` varchar(256) NOT NULL COMMENT "role name",
|
||||
`description` mediumtext NOT NULL COMMENT "role description",
|
||||
`version` varchar(256) NOT NULL COMMENT "version",
|
||||
`avatar` varchar(256) NOT NULL COMMENT "avatar uri",
|
||||
`background_image_info` mediumtext NOT NULL COMMENT "background image information, object structure",
|
||||
`onboarding_info` mediumtext NOT NULL COMMENT "intro information, object structure",
|
||||
`suggest_reply_info` mediumtext NOT NULL COMMENT "user suggestions, object structure",
|
||||
`audio_config` mediumtext NOT NULL COMMENT "agent audio config, object structure",
|
||||
`user_input_config` varchar(256) NOT NULL COMMENT "user input config, object structure",
|
||||
`creator_id` bigint unsigned NOT NULL COMMENT "creator id",
|
||||
`created_at` bigint unsigned NOT NULL COMMENT "create time in millisecond",
|
||||
`updated_at` bigint unsigned NULL COMMENT "update time in millisecond",
|
||||
`deleted_at` datetime(3) NULL COMMENT "delete time in millisecond",
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_connector_id_version` (`connector_id`, `version`),
|
||||
INDEX `idx_workflow_id_version` (`workflow_id`, `version`)
|
||||
) CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
2
docker/atlas/migrations/20250812093734_update.sql
Normal file
2
docker/atlas/migrations/20250812093734_update.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Create "files" table
|
||||
CREATE TABLE `opencoze`.`files` (`id` bigint unsigned NOT NULL COMMENT "id", `name` varchar(255) NOT NULL DEFAULT "" COMMENT "file name", `file_size` bigint unsigned NOT NULL DEFAULT 0 COMMENT "file size", `tos_uri` varchar(1024) NOT NULL DEFAULT "" COMMENT "TOS URI", `status` tinyint unsigned NOT NULL DEFAULT 0 COMMENT "status,0invalid,1valid", `comment` varchar(1024) NOT NULL DEFAULT "" COMMENT "file comment", `source` tinyint unsigned NOT NULL DEFAULT 0 COMMENT "source:1 from API,", `creator_id` varchar(512) NOT NULL DEFAULT "" COMMENT "creator id", `content_type` varchar(255) NOT NULL DEFAULT "" COMMENT "content type", `coze_account_id` bigint unsigned NOT NULL DEFAULT 0 COMMENT "coze account id", `created_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT "Create Time in Milliseconds", `updated_at` bigint unsigned NOT NULL DEFAULT 0 COMMENT "Update Time in Milliseconds", `deleted_at` datetime(3) NULL COMMENT "Delete Time", PRIMARY KEY (`id`), INDEX `idx_creator_id` (`creator_id`)) CHARSET utf8mb4 COLLATE utf8mb4_general_ci COMMENT "file resource table";
|
||||
7
docker/atlas/migrations/20250813081543_update.sql
Normal file
7
docker/atlas/migrations/20250813081543_update.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Modify "api_key" table
|
||||
ALTER TABLE `opencoze`.`api_key` ADD COLUMN `ak_type` tinyint NOT NULL DEFAULT 0 COMMENT "api key type ";
|
||||
-- Modify "single_agent_draft" table
|
||||
ALTER TABLE `opencoze`.`single_agent_draft` ADD COLUMN `bot_mode` tinyint NOT NULL DEFAULT 0 COMMENT "bot mode,0:single mode 2:chatflow mode" AFTER `database_config`, ADD COLUMN `layout_info` text NULL COMMENT "chatflow layout info";
|
||||
-- Modify "single_agent_version" table
|
||||
ALTER TABLE `opencoze`.`single_agent_version` ADD COLUMN `bot_mode` tinyint NOT NULL DEFAULT 0 COMMENT "bot mode,0:single mode 2:chatflow mode" AFTER `database_config`, ADD COLUMN `layout_info` text NULL COMMENT "chatflow layout info";
|
||||
|
||||
2
docker/atlas/migrations/20250822060516_update.sql
Normal file
2
docker/atlas/migrations/20250822060516_update.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- Modify "conversation" table
|
||||
ALTER TABLE `opencoze`.`conversation` ADD COLUMN `name` varchar(255) NOT NULL DEFAULT "" COMMENT "conversation name" AFTER `id`;
|
||||
@@ -1,4 +1,4 @@
|
||||
h1:3ar6fnSw3e4ni74BcE2N9cIentO27OcfSt465WTv2Po=
|
||||
h1:pZ9P9pFFqnfVc+o3V1CJLD8Rv3WyFM+mSwqKk1GTRRs=
|
||||
20250703095335_initial.sql h1:/joaeUTMhXqAEc0KwsSve5+bYM0qPOp+9OizJtsRc+U=
|
||||
20250703115304_update.sql h1:cbYo6Q6Lh96hB4hu5KW2Nn/Mr0VDpg7a1WPgpIb1SOc=
|
||||
20250704040445_update.sql h1:QWmoPY//oQ+GFZwET9w/oAWa8mM0KVaD5G8Yiu9bMqY=
|
||||
@@ -6,5 +6,9 @@ h1:3ar6fnSw3e4ni74BcE2N9cIentO27OcfSt465WTv2Po=
|
||||
20250710100212_update.sql h1:mN/3iKQDoIw2BTkMwWp3I/qOAcVGrQJ5tOJ0OqH4ZWU=
|
||||
20250711034533_update.sql h1:EWeK//5urS9hJIRCeD3lwQYWNH9AIKEWG9pMLdw7KPc=
|
||||
20250717125913_update.sql h1:WtPR99RlWZn0rXZsB19qp1hq0FwO5qmFhcTcV6EnFYs=
|
||||
20250730131847_update.sql h1:qIutMrXtuOA98jeucTFxXck+sQNjNTtIF2apbCYt3IY=
|
||||
20250802115105_update.sql h1:irreQaMAL0LtXcDlkdHP86C7/0e2HzEVsa1hP/FkZ2M=
|
||||
20250718104121_update.sql h1:JY7wbfjkmqTUAvTKBm9mC1w/cobKfSGK3eqYBUpDF0k=
|
||||
20250730131847_update.sql h1:3bSBm4UxtXWKSmnQHcd/T9uqw6riB0vcFNatiR6Ptj8=
|
||||
20250802115105_update.sql h1:89M8rwxbidK8uZ0UDFS++HQw+m/b0vugbfrF6kQXbEI=
|
||||
20250812093734_update.sql h1:27fQaPt0LYi1dA7MABvERthVR4pj4MRWFgdRVR3cd6w=
|
||||
20250813081543_update.sql h1:HyBPu1LVs8oiyABbZDU3fFW0n6MeC7qOpzcHWVkwNVc=
|
||||
20250822060516_update.sql h1:KoL8FPXw5/JMsJMtJsoGFIc4wYHlngBudeYSz5o4iKU=
|
||||
|
||||
Reference in New Issue
Block a user