Skip to content

Commit

Permalink
feat: (0.6)New UI (#1855)
Browse files Browse the repository at this point in the history
Co-authored-by: 夏姜 <wenfengjiang.jwf@digital-engine.com>
Co-authored-by: aries_ckt <916701291@qq.com>
Co-authored-by: wb-lh513319 <wb-lh513319@alibaba-inc.com>
Co-authored-by: csunny <cfqsunny@163.com>
  • Loading branch information
5 people authored Aug 21, 2024
1 parent 3fc8269 commit b124ecc
Show file tree
Hide file tree
Showing 824 changed files with 93,350 additions and 2,494 deletions.
5 changes: 3 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#** Webserver Port **#
#*******************************************************************#
# DBGPT_WEBSERVER_PORT=5670

## Whether to enable the new web UI, enabled by default,False use old ui
# USE_NEW_WEB_UI=True
#*******************************************************************#
#*** LLM PROVIDER ***#
#*******************************************************************#
Expand Down Expand Up @@ -169,7 +170,7 @@ GRAPH_STORE_TYPE=TuGraph
ElasticSearch_URL=127.0.0.1
ElasticSearch_PORT=9200
ElasticSearch_USERNAME=elastic
ElasticSearch_PASSWORD=i=+iLw9y0Jduq86XTi6W
ElasticSearch_PASSWORD={your_password}

### TuGraph config
#TUGRAPH_HOST=127.0.0.1
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,6 @@ thirdparty
/examples/**/*.gv.pdf
/i18n/locales/**/**/*_ai_translated.po
/i18n/locales/**/**/*~

/web_new/node_modules
/web_new/.next
4 changes: 4 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[mypy]
exclude = /tests/
# plugins = pydantic.mypy
[mypy-dbgpt.rag.*]
strict_optional = False
ignore_missing_imports = True
follow_imports = skip

[mypy-dbgpt.app.*]
follow_imports = skip
Expand Down
71 changes: 71 additions & 0 deletions assets/schema/upgrade/v0_6_0/upgrade_to_v0.6.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
USE dbgpt;
-- chat_history
ALTER TABLE chat_history ADD COLUMN `app_code` varchar(255) DEFAULT NULL COMMENT 'App unique code' after `message_ids`;

-- gpts_app
ALTER TABLE gpts_app ADD COLUMN `published` varchar(64) DEFAULT 'false' COMMENT 'Has it been published?';
ALTER TABLE gpts_app ADD COLUMN `param_need` text DEFAULT NULL COMMENT 'Parameter information supported by the application';
ALTER TABLE gpts_app ADD COLUMN `admins` text DEFAULT NULL COMMENT 'administrator';


-- connect_config
ALTER TABLE connect_config ADD COLUMN `user_name` varchar(255) DEFAULT NULL COMMENT 'user name';
ALTER TABLE connect_config ADD COLUMN `user_id` varchar(255) DEFAULT NULL COMMENT 'user id';

-- document_chunk
ALTER TABLE document_chunk ADD COLUMN `questions` text DEFAULT NULL COMMENT 'chunk related questions';

-- knowledge_document
ALTER TABLE knowledge_document ADD COLUMN `doc_token` varchar(100) DEFAULT NULL COMMENT 'doc token';
ALTER TABLE knowledge_document ADD COLUMN `questions` text DEFAULT NULL COMMENT 'document related questions';

-- gpts_messages
ALTER TABLE gpts_messages ADD COLUMN `is_success` int(4) NULL DEFAULT 0 COMMENT 'agent message is success';
ALTER TABLE gpts_messages ADD COLUMN `app_code` varchar(255) NOT NULL COMMENT 'Current AI assistant code';
ALTER TABLE gpts_messages ADD COLUMN `app_name` varchar(255) NOT NULL COMMENT 'Current AI assistant name';
ALTER TABLE gpts_messages ADD COLUMN `resource_info` text DEFAULT NULL COMMENT 'Current conversation resource info';

-- prompt_manage
ALTER TABLE prompt_manage ADD COLUMN `prompt_code` varchar(255) NULL COMMENT 'Prompt code';
ALTER TABLE prompt_manage ADD COLUMN `response_schema` text NULL COMMENT 'Prompt response schema';
ALTER TABLE prompt_manage ADD COLUMN `user_code` varchar(128) NULL COMMENT 'User code';

-- chat_feed_back
ALTER TABLE chat_feed_back ADD COLUMN `message_id` varchar(255) NULL COMMENT 'Message id';
ALTER TABLE chat_feed_back ADD COLUMN `feedback_type` varchar(50) NULL COMMENT 'Feedback type like or unlike';
ALTER TABLE chat_feed_back ADD COLUMN `reason_types` varchar(255) NULL COMMENT 'Feedback reason categories';
ALTER TABLE chat_feed_back ADD COLUMN `user_code` varchar(128) NULL COMMENT 'User code';
ALTER TABLE chat_feed_back ADD COLUMN `remark` text NULL COMMENT 'Feedback remark';


-- dbgpt.recommend_question definition
CREATE TABLE `recommend_question` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
`gmt_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last update time',
`app_code` varchar(255) DEFAULT NULL COMMENT 'Current AI assistant code',
`question` text DEFAULT NULL COMMENT 'question',
`user_code` int(11) DEFAULT NULL COMMENT 'user code',
`sys_code` varchar(255) DEFAULT NULL COMMENT 'system app code',
`valid` varchar(10) DEFAULT 'true' COMMENT 'is it effective,true/false',
`chat_mode` varchar(255) DEFAULT NULL COMMENT 'Conversation scene mode,chat_knowledge...',
`params` text DEFAULT NULL COMMENT 'question param',
`is_hot_question` varchar(10) DEFAULT 'false' COMMENT 'Is it a popular recommendation question?',
PRIMARY KEY (`id`),
KEY `idx_app_code` (`app_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT="AI application related recommendation issues";

-- dbgpt.user_recent_apps definition
CREATE TABLE `user_recent_apps` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`gmt_create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
`gmt_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'last update time',
`app_code` varchar(255) DEFAULT NULL COMMENT 'AI assistant code',
`last_accessed` timestamp NULL DEFAULT NULL COMMENT 'User recent usage time',
`user_code` varchar(255) DEFAULT NULL COMMENT 'user code',
`sys_code` varchar(255) DEFAULT NULL COMMENT 'system app code',
PRIMARY KEY (`id`),
KEY `idx_app_code` (`app_code`),
KEY `idx_last_accessed` (`last_accessed`),
KEY `idx_user_code` (`user_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='User recently used apps'
Loading

0 comments on commit b124ecc

Please sign in to comment.