Chat2DB

Chat2DB: Smart SQL client with ChatGPT

4 min


[vc_row][vc_column][vc_headings linewidth=”0″ borderwidth=”1″ borderclr=”#000000″ title=”Chat2DB” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” titlesize=”60″ titleclr=”#000000″]Smart SQL client with ChatGPT[/vc_headings][vc_single_image image=”3056″ alignment=”center”][vc_column_text]Chat2DB is an open-source tool for multiple databases from Alibaba. Unlike traditional database clients like Navicat and DBeaver, Chat2DB has AIGC capabilities that can turn natural language into SQL, and vice versa. It can also give SQL optimization tips to boost developers’ efficiency. It is a tool for database developers in the AI era, and even non-SQL users can use it to query data and generate reports quickly.[/vc_column_text][vc_separator][/vc_column][/vc_row][vc_row][vc_column][vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Features” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2871″][/vc_headings][evc_icon_with_text type=”icon-left” icon_library=”fontawesome” title_tag=”” icon_fontawesome=”fas fa-robot” title=”AI intelligent assistant” text=”You can use natural language to write and execute SQL queries, or convert SQL queries to natural language for better understanding. You can also get suggestions for optimizing your SQL performance and readability.” text_color=”#0a0000″][evc_icon_with_text type=”icon-left” icon_library=”fontawesome” title_tag=”” icon_fontawesome=”fas fa-users” title=”Team collaboration” text=”You can share your work with your teammates without exposing your online database password, ensuring the security of your enterprise database account.” text_color=”#0a0000″][evc_icon_with_text type=”icon-left” icon_library=”fontawesome” title_tag=”” icon_fontawesome=”fas fa-cogs” title=”Data management” text=”You can manage various data objects, such as tables, views, stored procedures, functions, triggers, indexes, sequences, users, roles, and authorizations, with ease and efficiency.” text_color=”#0a0000″][evc_icon_with_text type=”icon-left” icon_library=”fontawesome” title_tag=”” icon_fontawesome=”fas fa-code-branch” title=”Extension capability” text=”You can connect to multiple databases, such as MySQL, PostgreSQL, Oracle, SQLServer, ClickHouse, OceanBase, H2, SQLite, and more. We are constantly adding support for more databases in the future.” text_color=”#0a0000″][evc_icon_with_text type=”icon-left” icon_library=”fontawesome” title_tag=”” icon_fontawesome=”fas fa-layer-group” title=”Cross-platform development” text=”You can use our product on Windows, Mac, Linux, or web browsers, thanks to our front-end development using Electron.” text_color=”#0a0000″][evc_icon_with_text type=”icon-left” icon_library=”fontawesome” title_tag=”” icon_fontawesome=”far fa-object-ungroup” title=”Environment isolation” text=”You can separate your online and daily data permissions, ensuring the safety and integrity of your data.” text_color=”#0a0000″][vc_separator color=”sandy_brown” border_width=”3″][/vc_column][/vc_row][vc_row][vc_column][vc_separator border_width=”3″][vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Downloads” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2852″][/vc_headings][/vc_column][/vc_row][vc_row content_placement=”middle”][vc_column width=”1/4″][vc_single_image image=”4385″ onclick=”custom_link” img_link_target=”_blank” title=”Windows” link=”https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB%20Setup%201.0.11.exe”][/vc_column][vc_column width=”1/4″][vc_single_image image=”4384″ onclick=”custom_link” img_link_target=”_blank” title=”MacOS ARM64″ link=”https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11-arm64.dmg”][/vc_column][vc_column width=”1/4″][vc_single_image image=”4384″ alignment=”center” onclick=”custom_link” img_link_target=”_blank” title=”MacOS X64″ link=”https://oss-chat2db.alibaba.com/release/1.0.11/Chat2DB-1.0.11-arm64.dmg”][/vc_column][vc_column width=”1/4″][vc_single_image image=”4383″ alignment=”center” onclick=”custom_link” img_link_target=”_blank” title=”JAR” link=”https://oss-chat2db.alibaba.com/release/1.0.11/ali-dbhub-server-start.jar”][/vc_column][/vc_row][vc_row][vc_column][vc_separator][vc_headings style=”theme4″ borderclr=”#000000″ style2=”image” title=”Getting Started 🚀” google_fonts=”font_family:Comfortaa%3A300%2Cregular%2C700|font_style:700%20bold%20regular%3A700%3Anormal” lineheight=”3″ titlesize=”40″ titleclr=”#000000″ image_id=”2854″][/vc_headings][vc_column_text]

AI Configuration

CONFIGURE OPENAI

Option (1): To access the ChatSql feature of OPENAI, you need to satisfy two requirements:

  • You need an OPENAI_API_KEY.
  • To access the OPENAI website from the client’s network, you may need a VPN if you are in China. Make sure your VPN works well, or use the network proxy settings in the client to specify the HOST and PORT.

Option (2): Unified Proxy Service

  • No OPENAI_API_KEY is required.
  • You can access the service without using a proxy or VPN, provided that you have a network connection.

[/vc_column_text][vc_message]To access Chat2DB AI features faster, you can use WeChat to request your own API_KEY. The process is simple and easy.[/vc_message][/vc_column][/vc_row][vc_row][vc_column][vc_column_text]

🐳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 git@github.com:alibaba/Chat2DB.git
  • Front-End installation
$ cd Chat2DB/ali-dbhub-client
$ npm install # Mounting front-end dependency
$ npm run build:prod # Package js to the source directory on the back end
  • Backend debug
$ cd ../ali-dbhub-server
$ mvn clean install # maven 3.8 or later needs to be installed
$ cd ali-dbhub-server/ali-dbhub-server-start/target/
$ java -jar -Dchatgpt.apiKey=xxxxx ali-dbhub-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.
$ # open http://127.0.0.1:10821 to start debug Note: Front-end installation is required
  • Front-End debug
$ cd Chat2DB/ali-dbhub-client
$ npm install 
$ npm run start 
$ # open http://127.0.0.1:10821  to start Front-End debug
$ # Note Front-end page completely depends on the service, so front-end students need to debug the back-end project

To debug the front end, you need to map the resources. You can use XSwitch and add this configuration file.

{
  "proxy": [
    [
      "http://127.0.0.1:10821/(.*).js$",
      "http://127.0.0.1:8001/$1.js",
    ],
    [
      "http://127.0.0.1:10821/(.*).css$",
      "http://127.0.0.1:8001/$1.css",
    ],
    [
      "http://127.0.0.1:10821/static/front/(.*)",
      "http://127.0.0.1:8001/$1",
    ],
    [
      "http://127.0.0.1:10821/static/(.*)$",
      "http://127.0.0.1:8001/static/$1",
    ],
  ],
}

[/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/3″][mvc_advanced_button align=”center” btn_text=”Github” icon_size=”25″ use_theme_fonts=”yes” btn_icon=”fab fa-github” btn_url=”url:https%3A%2F%2Fgithub.com%2Falibaba%2FChat2DB|target:_blank” btn_clr=”#ffffff” btn_bg=”#0a0a0a” btn_radius=”50″][/vc_column][vc_column width=”1/3″][mvc_advanced_button align=”center” btn_text=”Website” icon_size=”25″ use_theme_fonts=”yes” btn_url=”url:https%3A%2F%2Fchat2db.opensource.alibaba.com%2F|target:_blank” btn_clr=”#ffffff” btn_bg=”#4785f7″ btn_radius=”50″ btn_icon=”fas fa-globe”][/vc_column][vc_column width=”1/3″][mvc_advanced_button align=”center” btn_text=”EMail” icon_size=”25″ use_theme_fonts=”yes” btn_icon=”far fa-envelope” btn_url=”url:mailto%3A1558143046%40qq.com|target:_blank” btn_clr=”#ffffff” btn_bg=”#0e76a8″ btn_radius=”50″][/vc_column][/vc_row]

Comments

comments


Like it? Share with your friends!

0

0 Comments

Your email address will not be published. Required fields are marked *

Belmechri

I am an IT engineer, content creator, and proud father with a passion for innovation and excellence. In both my personal and professional life, I strive for excellence and am committed to finding innovative solutions to complex problems.