Skip to content

🔥 🔥 🔥 An intelligent and versatile general-purpose SQL client and reporting tool for databases which integrates ChatGPT capabilities.(智能的通用数据库SQL客户端和报表工具)

License

Notifications You must be signed in to change notification settings

Y5ive9ine/Chat2DB

 
 

Repository files navigation

Chat2DB

An intelligent and versatile general-purpose SQL client and reporting tool for databases which integrates ChatGPT capabilities.

License GitHub release GitHub Stars GitHub Forks GitHub Contributors

Share Chat2DB Repository

Share on Telegram Share on Reddit

License Notation: Chat2DB is constructed and distributed for personal and non-commercial use only. For commercial use of this project, please contact corresponding authors.

Languages: English | 中文

DEMO

demo2.0.mp4

📖 Introduction

   Chat2DB is a multi-database client tool that is open-source and free. It supports local installation on Windows and Mac, as well as server-side deployment and web page access. Compared to traditional database client software such as Navicat and DBeaver, Chat2DB integrates AIGC's capabilities and is able to convert natural language into SQL. It can also convert SQL into natural language and provide optimization suggestions for SQL to greatly enhance the efficiency of developers. It is a tool for database developers in the AI era, and even non-SQL business operators in the future can use it to quickly query business data and generate reports.

✨ Features

  • 🌈 AI intelligent assistant, supporting natural language to SQL conversion, SQL to natural language conversion, and SQL optimization suggestions
  • 👭 Support team collaboration, developers do not need to know the online database password, solving the problem of enterprise database account security
  • ⚙️ Powerful data management capability, supporting management of data tables, views, stored procedures, functions, triggers, indexes, sequences, users, roles, authorizations, etc.
  • 🔌 Powerful extension capability, currently supporting MySQL, PostgreSQL, Oracle, SQLServer, ClickHouse, OceanBase, H2, SQLite, etc., and more databases will be supported in the future
  • 🛡 Front-end development using Electron, providing a solution that integrates Windows, Mac, Linux clients, and web versions
  • 🎁 Support environment isolation, online, and daily data permission separation

⏬ Download and Install

Description Download
Windows https://oss-chat2db.alibaba.com/release/2.0.2/Chat2DB%20Setup%202.0.2.exe
MacOS ARM64 https://oss-chat2db.alibaba.com/release/2.0.2/Chat2DB-2.0.2-arm64.dmg
MacOS X64 https://oss-chat2db.alibaba.com/release/2.0.2/Chat2DB-2.0.2.dmg
Jar 包 https://oss-chat2db.alibaba.com/release/2.0.2/chat2db-server-start.jar

🚀 Supported databases

Databases Status
Mysql
H2
Oracle
PostgreSQL
SQLServer
SQLLite
MariaDB
ClickHouse
DM
Presto
DB2
OceanBase
Redis
Hive
KingBase
MongoDB
Hbase Planning
Elasticsearch Planning
openGauss Planning
TiDB Planning
InfluxDB Planning

🌰 Demo

Create data source

Data source management

SQL console

AI intelligent assistant

🔥 AI Configuration

CONFIGURE OPENAI

Option 1 (recommended): To use the ChatSql function of OPENAI, two conditions must be met:

  • You need an OPENAI_API_KEY.
  • The client's network can connect to the OPENAI website, and for users in China, a VPN is required. Note: If the local VPN is not fully effective, the network connectivity can be ensured by setting the network proxy HOST and PORT in the client.

Option 2 (recommended): We provide a unified proxy service.

  • No OPENAI_API_KEY is required.
  • No proxy or VPN is required, as long as the network is connected.

To facilitate users' quick use of AI capabilities, you can scan the QR code below to follow our WeChat public account and apply for our custom API_KEY.

CONFIGURE CUSTOM AI

  • Customized AI can be any LLM that you deployed, such as ChatGLM、ChatGPT、ERNIE Bot、Tongyi Qianwen, and so on. However, the customized interface need to conform to the protocol definition. Otherwise, secondary development may be required. Two DEMOs are provided in the code, the configuration is as shown below. In specific use, you can refer to the DEMO interface to write a custom interface, or directly perform secondary development in the DEMO interface.
  • DEMO for configuring customized stream output interface.
  • DEMO for configuring customized non-stream output interface.

📦 Docker installation

docker pull chat2db/chat2db:latest

🎯 Operating Environment

Note: If local debugging is required

  • Java runtime Open JDK 17
  • JRE reference packaging and deployment method of jre.
  • Node runtime environment Node16 Node.js.

💻 Local Debugging

  • git clone to local
$ git clone [email protected]:alibaba/Chat2DB.git
  • Front-End debug
$ cd Chat2DB/chat2db-client
$ yarn
$ yarn run start:web
  • Backend debug
$ cd ../chat2db-server
$ mvn clean install # maven 3.8 or later needs to be installed
$ cd chat2db-server/chat2db-server-start/target/
$ java -jar -Dchatgpt.apiKey=xxxxx chat2db-server-start.jar  # To launch the chat application, you need to enter the ChatGPT key for the chatgpt.apiKey. Without entering it, you won't be able to use the AIGC function.

📑 Documentation

Stargazers

Stargazers repo roster for @chat2db/Chat2DB

Forkers

Forkers repo roster for @chat2db/Chat2DB

☎️ Contact Us

Please star and fork on GitHub before joining the group. Follow our WeChat public account.

❤️ Acknowledgements

Thanks to all the students who contributed to Chat2DB~

Star History

Star History Chart

About

🔥 🔥 🔥 An intelligent and versatile general-purpose SQL client and reporting tool for databases which integrates ChatGPT capabilities.(智能的通用数据库SQL客户端和报表工具)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 60.0%
  • TypeScript 33.1%
  • Less 6.1%
  • JavaScript 0.6%
  • HTML 0.1%
  • EJS 0.1%