Skip to content

Commit

Permalink
feat: new dbgpts modules (#1910)
Browse files Browse the repository at this point in the history
Co-authored-by: 途杨 <[email protected]>
Co-authored-by: lhwan <[email protected]>
  • Loading branch information
3 people authored Aug 28, 2024
1 parent bb5d2d1 commit d7a893e
Show file tree
Hide file tree
Showing 289 changed files with 3,533 additions and 901 deletions.
40 changes: 39 additions & 1 deletion assets/schema/dbgpt.sql
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,45 @@ CREATE TABLE `user_recent_apps` (
KEY `idx_user_r_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'
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='User recently used apps';

-- dbgpt.dbgpt_serve_dbgpts_my definition
CREATE TABLE `dbgpt_serve_dbgpts_my` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`name` varchar(255) NOT NULL COMMENT 'plugin name',
`user_code` varchar(255) DEFAULT NULL COMMENT 'user code',
`user_name` varchar(255) DEFAULT NULL COMMENT 'user name',
`file_name` varchar(255) NOT NULL COMMENT 'plugin package file name',
`type` varchar(255) DEFAULT NULL COMMENT 'plugin type',
`version` varchar(255) DEFAULT NULL COMMENT 'plugin version',
`use_count` int DEFAULT NULL COMMENT 'plugin total use count',
`succ_count` int DEFAULT NULL COMMENT 'plugin total success count',
`sys_code` varchar(128) DEFAULT NULL COMMENT 'System code',
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin install time',
`gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`, `user_name`),
KEY `ix_my_plugin_sys_code` (`sys_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- dbgpt.dbgpt_serve_dbgpts_hub definition
CREATE TABLE `dbgpt_serve_dbgpts_hub` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`name` varchar(255) NOT NULL COMMENT 'plugin name',
`description` varchar(255) NULL COMMENT 'plugin description',
`author` varchar(255) DEFAULT NULL COMMENT 'plugin author',
`email` varchar(255) DEFAULT NULL COMMENT 'plugin author email',
`type` varchar(255) DEFAULT NULL COMMENT 'plugin type',
`version` varchar(255) DEFAULT NULL COMMENT 'plugin version',
`storage_channel` varchar(255) DEFAULT NULL COMMENT 'plugin storage channel',
`storage_url` varchar(255) DEFAULT NULL COMMENT 'plugin download url',
`download_param` varchar(255) DEFAULT NULL COMMENT 'plugin download param',
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin upload time',
`gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time',
`installed` int DEFAULT NULL COMMENT 'plugin already installed count',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


CREATE
Expand Down
37 changes: 37 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
Expand Up @@ -116,3 +116,40 @@ CREATE TABLE `dbgpt_serve_variables` (
KEY `ix_your_table_name_name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- dbgpt.dbgpt_serve_dbgpts_my definition
CREATE TABLE `dbgpt_serve_dbgpts_my` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`name` varchar(255) NOT NULL COMMENT 'plugin name',
`user_name` varchar(255) DEFAULT NULL COMMENT 'user name',
`file_name` varchar(255) NOT NULL COMMENT 'plugin package file name',
`type` varchar(255) DEFAULT NULL COMMENT 'plugin type',
`version` varchar(255) DEFAULT NULL COMMENT 'plugin version',
`use_count` int DEFAULT NULL COMMENT 'plugin total use count',
`succ_count` int DEFAULT NULL COMMENT 'plugin total success count',
`sys_code` varchar(128) DEFAULT NULL COMMENT 'System code',
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin install time',
`gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`, `user_name`),
KEY `ix_my_plugin_sys_code` (`sys_code`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- dbgpt.dbgpt_serve_dbgpts_hub definition
CREATE TABLE `dbgpt_serve_dbgpts_hub` (
`id` int NOT NULL AUTO_INCREMENT COMMENT 'autoincrement id',
`name` varchar(255) NOT NULL COMMENT 'plugin name',
`description` varchar(255) NULL COMMENT 'plugin description',
`author` varchar(255) DEFAULT NULL COMMENT 'plugin author',
`email` varchar(255) DEFAULT NULL COMMENT 'plugin author email',
`type` varchar(255) DEFAULT NULL COMMENT 'plugin type',
`version` varchar(255) DEFAULT NULL COMMENT 'plugin version',
`storage_channel` varchar(255) DEFAULT NULL COMMENT 'plugin storage channel',
`storage_url` varchar(255) DEFAULT NULL COMMENT 'plugin download url',
`download_param` varchar(255) DEFAULT NULL COMMENT 'plugin download param',
`gmt_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT 'plugin upload time',
`gmt_modified` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time',
`installed` int DEFAULT NULL COMMENT 'plugin already installed count',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

11 changes: 11 additions & 0 deletions dbgpt/app/initialization/serve_initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ def register_serve_apps(system_app: SystemApp, cfg: Config, webserver_port: int)
system_app.register(FeedbackServe)
# ################################ Chat Feedback Register End ########################################

# ################################ DbGpts Register Begin ########################################
# Register serve dbgptshub
from dbgpt.serve.dbgpts.hub.serve import Serve as DbgptsHubServe

system_app.register(DbgptsHubServe)
# Register serve dbgptsmy
from dbgpt.serve.dbgpts.my.serve import Serve as DbgptsMyServe

system_app.register(DbgptsMyServe)
# ################################ DbGpts Register End ########################################

# ################################ File Serve Register Begin ######################################

from dbgpt.configs.model_config import FILE_SERVER_LOCAL_STORAGE_PATH
Expand Down
2 changes: 1 addition & 1 deletion dbgpt/app/static/web/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="icon" href="/favicon.ico"/><meta name="description" content="Revolutionizing Database Interactions with Private LLM Technology"/><meta property="og:description" content="eosphoros-ai"/><meta property="og:title" content="DB-GPT"/><link rel="preload" href="/_next/static/css/1cc3e7b6ed5336c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1cc3e7b6ed5336c0.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-96df1e524e6ca95b.js" defer=""></script><script src="/_next/static/chunks/framework-a58764f9d1596524.js" defer=""></script><script src="/_next/static/chunks/main-05be4496aadb43c7.js" defer=""></script><script src="/_next/static/chunks/pages/_app-58fe09de707d59d2.js" defer=""></script><script src="/_next/static/chunks/pages/_error-4fa9991a75118e6f.js" defer=""></script><script src="/_next/static/vTEducxt-kxqB-72R55zw/_buildManifest.js" defer=""></script><script src="/_next/static/vTEducxt-kxqB-72R55zw/_ssgManifest.js" defer=""></script><link rel="stylesheet" href="/_next/static/css/antd-output/antd.min.7d5365b5.css"/></head><body><div id="__next"><div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"vTEducxt-kxqB-72R55zw","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="icon" href="/favicon.ico"/><meta name="description" content="Revolutionizing Database Interactions with Private LLM Technology"/><meta property="og:description" content="eosphoros-ai"/><meta property="og:title" content="DB-GPT"/><link rel="preload" href="/_next/static/css/f8eb45c952dd19e2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb45c952dd19e2.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-aae1f4a1a3b156bd.js" defer=""></script><script src="/_next/static/chunks/framework-e41fd17eac0ca504.js" defer=""></script><script src="/_next/static/chunks/main-05be4496aadb43c7.js" defer=""></script><script src="/_next/static/chunks/pages/_app-72304f997d4f174e.js" defer=""></script><script src="/_next/static/chunks/pages/_error-4fa9991a75118e6f.js" defer=""></script><script src="/_next/static/-L9Od0w1XElCNcbCi4hJV/_buildManifest.js" defer=""></script><script src="/_next/static/-L9Od0w1XElCNcbCi4hJV/_ssgManifest.js" defer=""></script><link rel="stylesheet" href="/_next/static/css/antd-output/antd.min.7d5365b5.css"/></head><body><div id="__next"><div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"-L9Od0w1XElCNcbCi4hJV","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
2 changes: 1 addition & 1 deletion dbgpt/app/static/web/404/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="icon" href="/favicon.ico"/><meta name="description" content="Revolutionizing Database Interactions with Private LLM Technology"/><meta property="og:description" content="eosphoros-ai"/><meta property="og:title" content="DB-GPT"/><link rel="preload" href="/_next/static/css/1cc3e7b6ed5336c0.css" as="style"/><link rel="stylesheet" href="/_next/static/css/1cc3e7b6ed5336c0.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-96df1e524e6ca95b.js" defer=""></script><script src="/_next/static/chunks/framework-a58764f9d1596524.js" defer=""></script><script src="/_next/static/chunks/main-05be4496aadb43c7.js" defer=""></script><script src="/_next/static/chunks/pages/_app-58fe09de707d59d2.js" defer=""></script><script src="/_next/static/chunks/pages/_error-4fa9991a75118e6f.js" defer=""></script><script src="/_next/static/vTEducxt-kxqB-72R55zw/_buildManifest.js" defer=""></script><script src="/_next/static/vTEducxt-kxqB-72R55zw/_ssgManifest.js" defer=""></script><link rel="stylesheet" href="/_next/static/css/antd-output/antd.min.7d5365b5.css"/></head><body><div id="__next"><div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"vTEducxt-kxqB-72R55zw","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="icon" href="/favicon.ico"/><meta name="description" content="Revolutionizing Database Interactions with Private LLM Technology"/><meta property="og:description" content="eosphoros-ai"/><meta property="og:title" content="DB-GPT"/><link rel="preload" href="/_next/static/css/f8eb45c952dd19e2.css" as="style"/><link rel="stylesheet" href="/_next/static/css/f8eb45c952dd19e2.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-aae1f4a1a3b156bd.js" defer=""></script><script src="/_next/static/chunks/framework-e41fd17eac0ca504.js" defer=""></script><script src="/_next/static/chunks/main-05be4496aadb43c7.js" defer=""></script><script src="/_next/static/chunks/pages/_app-72304f997d4f174e.js" defer=""></script><script src="/_next/static/chunks/pages/_error-4fa9991a75118e6f.js" defer=""></script><script src="/_next/static/-L9Od0w1XElCNcbCi4hJV/_buildManifest.js" defer=""></script><script src="/_next/static/-L9Od0w1XElCNcbCi4hJV/_ssgManifest.js" defer=""></script><link rel="stylesheet" href="/_next/static/css/antd-output/antd.min.7d5365b5.css"/></head><body><div id="__next"><div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":404}},"page":"/_error","query":{},"buildId":"-L9Od0w1XElCNcbCi4hJV","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
Loading

0 comments on commit d7a893e

Please sign in to comment.