diff --git a/README.md b/README.md index aaba2fa1..d5945ff1 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ This website is built using [Docusaurus 2](https://docusaurus.io/), a modern sta $ yarn ``` +### How to use zh + +``` +yarn start --locale zh +``` + ### Local Development ``` diff --git a/docs/guides/user-guide.md b/docs/guides/user-guide.md index 864f2a6f..37a5b8fb 100644 --- a/docs/guides/user-guide.md +++ b/docs/guides/user-guide.md @@ -1,5 +1,5 @@ --- -title: 'UserGuide' +title: "UserGuide" sidebar_position: 3 description: Chat2DB is a database client and BI reporting tool that integrates AI capabilities and supports management of various databases including MySQL, Oracle, etc. --- @@ -14,28 +14,28 @@ Coming soon Open Chat2DB client, click the "Connections" button on the left, select "DEMO Database", right-click the "Connect" button or double-click to connect to the DEMO database. - +![My Image Description](../img/website-userguide-1.png) ⚠ Tips: Accessing the DEMO data requires an internet connection. If you cannot connect to the internet, ignore the error and delete the DEMO data. Then connect to your own database. As shown in the image below, Chat2DB has connected to the DEMO database and can be used directly. The block 2 and 3 represent database schemas, you can click there to switch databases. The block 4 and 5 show the database tables, you can click here to view table structures. The block 6 can add a new console where you can execute sql on your database. - +![My Image Description](../img/website-userguide-2.png) Click the dashboard button on the left to view the dashboard features - - +![My Image Description](../img/website-userguide-3.png) ## Datasource Management -Click the "Connection" button on the left and select your database type when you add new connection. - +Click the "Connection" button on the left and select your database type when you add new connection. +![My Image Description](../img/website-userguide-4.png) ### Configure Database Connection + Configure the database connection, click the "Test" button. If the connection is successful, click the "Save" button to save the connection. Then double click the connection to connect to your database. - +![My Image Description](../img/website-userguide-5.png) ### Configure Database Driver @@ -44,14 +44,15 @@ Connecting to a database requires downloading the corresponding driver. If the d 1. If you can connect to the internet, click the "Download Driver" button to download the driver, then choose the driver. 2. If you cannot connect to the internet or the default driver does not match your database, you can download the driver manually. Click the "Upload Driver" button, select the driver file to upload. You can use your local driver after uploading. - - - +![My Image Description](../img/website-userguide-6.png) +![My Image Description](../img/website-userguide-7.png) +![My Image Description](../img/website-userguide-8.png) ### Configure SSH Tunnel + If the database needs to be connected via an SSH tunnel, set "Use SSH" as true to configure SSH tunnel. Then click the "Test the SSH Tunnel" button, you can connect to your database via ssh after the test is successful. - +![My Image Description](../img/website-userguide-9.png) ### ⚠ Error Prompts @@ -59,21 +60,22 @@ If the connection fails, there will be error prompts. You can troubleshoot based If you still cannot resolve the issue, copy the error details and submit an issue on GitHub. We will check all the issues regularly, so submitting an issue is the most effective way to resolve problems. - +![My Image Description](../img/website-userguide-10.png) ## Database Management + Click the first button on the left to view the connected databases. The block 2 and 3 represent database schemas, you can click here to switch databases. The block 4 and 5 represent database tables, click table to view table structures. Click button in block 6 can create a new SQL console where you can perform operations on the database. - +![website-mutli-database](../img/website-mutli-database.png) Select the SQL in the console, then you can click the "Run" button to execute the SQL. The bottom of console will display the execution results, you can page through the results or export them. Also, you can click the Format button to format the selected SQL. Meanwhile, you can click the "Save" button in the console to save the SQL. Then you can view saved records in the block "Saved" and directly open them next time. - +![My Image Description](../img/website-userguide-11.png) ## AI Management -### Option1 : ⚠ Use AI through OpenAI key +### Option1 : ⚠ Use AI through OpenAI key ⚠ Tips: Using the OpenAI key makes direct requests to the OpenAI API. Chat2DB does not limit the use of OpenAI, if you have any objections you can review the code directly. If you encounter errors using OpenAI, 95% are due to OpenAI restrictions: @@ -82,44 +84,41 @@ Accessing OpenAI requires being able to bypass the firewall and enable global pr Most people buy a shared key on Taobao or other platforms to access OpenAI which were restricted - if multiple people use the same key, OpenAI will limit its usage. Please refer the OpenAI official document here: https://platform.openai.com/docs/guides/rate-limits/overview - +![My Image Description](../img/website-userguide-12.png) If you have resolved the above issues, you can follow the below steps to configure and use OpenAI. Click Settings in the lower left corner --> Custom AI --> OpenAI, enter the OpenAI key and click Save. The API Host usually does not need to be configured. If you have a private OpenAI proxy, you can modify the API Host. HTTP Proxy Host and HTTP Proxy Port are usually not needed, configure them if your network needs a proxy to access OpenAI. - - +![My Image Description](../img/website-userguide-13.png) ### Option2: ✅ Use AI through Chat2DB AI (recommended) + Chat2DB AI does not require bypassing the firewall. Scan the QR code below to follow the Chat2DB Official Account, reply "AI" to get an AI key, then configure it in Chat2DB to use AI capabilities. - +![My Image Description](../img/website-userguide-14.png) Click Settings in the lower left corner --> Custom AI --> Chat2DB AI, enter the AI key and click Save. - - +![My Image Description](../img/website-userguide-15.png) -### Other options: +### Other options: We also support AzureAI or custom AI. The configuration is similar, just modify the AI type and key. -## Using AI +## Using AI ### 1、AI generates SQL In Database Management -> select the database -> create a new SQL console. There is an input box above the console, enter the natural language that you want AI to generate, then press Enter button. AI will automatically generate the SQL you wanted in the console. Click the Execute button to execute it. The results will display on the bottom of the console, you can page through them or export them. - - +![My Image Description](../img/website-userguide-16.png) ### 2、Explain SQL Right-click the selected SQL -> click Explain SQL. AI will explain the SQL in the popup window on the right of the console. - - +![My Image Description](../img/website-userguide-17.png) ### 3、Optimize SQL @@ -133,11 +132,11 @@ Right-click the selected SQL -> click Convert SQL. AI will convert the current S Click the second button on the left to view created reports. Click the report and view the corresponding data. - +![My Image Description](../img/website-userguide-18.png) Click the "+" button to create a new dashboard -> enter the dashboard name -> click Save. Then select the newly created dashboard to start editing data. - +![My Image Description](../img/website-userguide-19.png) - 1、Select the data source for the current chart which you can choose from the connected databases. - 2、Enter the data to query for this report chart, AI will start generating the SQL. @@ -145,10 +144,9 @@ Click the "+" button to create a new dashboard -> enter the dashboard name -> cl - 4、Select the chart type, x axis and y axis. - 5、Click "Confirm" button to save the current chart. - 6、Click the "+" under the chart to continue adding chart to the current report dashboard. - - +![My Image Description](../img/website-userguide-20.png) -## Local Debugging +## Local Debugging - git clone to your local repository diff --git a/docs/img/website-mutli-database.png b/docs/img/website-mutli-database.png new file mode 100644 index 00000000..540f3964 Binary files /dev/null and b/docs/img/website-mutli-database.png differ diff --git a/docs/img/website-userguide-1.png b/docs/img/website-userguide-1.png new file mode 100644 index 00000000..a068e50f Binary files /dev/null and b/docs/img/website-userguide-1.png differ diff --git a/docs/img/website-userguide-10.png b/docs/img/website-userguide-10.png new file mode 100644 index 00000000..083ba3ac Binary files /dev/null and b/docs/img/website-userguide-10.png differ diff --git a/docs/img/website-userguide-11.png b/docs/img/website-userguide-11.png new file mode 100644 index 00000000..e09673c4 Binary files /dev/null and b/docs/img/website-userguide-11.png differ diff --git a/docs/img/website-userguide-12.png b/docs/img/website-userguide-12.png new file mode 100644 index 00000000..aa4d30af Binary files /dev/null and b/docs/img/website-userguide-12.png differ diff --git a/docs/img/website-userguide-13.png b/docs/img/website-userguide-13.png new file mode 100644 index 00000000..349c97ed Binary files /dev/null and b/docs/img/website-userguide-13.png differ diff --git a/docs/img/website-userguide-14.png b/docs/img/website-userguide-14.png new file mode 100644 index 00000000..4cfd0154 Binary files /dev/null and b/docs/img/website-userguide-14.png differ diff --git a/docs/img/website-userguide-15.png b/docs/img/website-userguide-15.png new file mode 100644 index 00000000..dc241d55 Binary files /dev/null and b/docs/img/website-userguide-15.png differ diff --git a/docs/img/website-userguide-16.png b/docs/img/website-userguide-16.png new file mode 100644 index 00000000..bb948ea0 Binary files /dev/null and b/docs/img/website-userguide-16.png differ diff --git a/docs/img/website-userguide-17.png b/docs/img/website-userguide-17.png new file mode 100644 index 00000000..7f812188 Binary files /dev/null and b/docs/img/website-userguide-17.png differ diff --git a/docs/img/website-userguide-18.png b/docs/img/website-userguide-18.png new file mode 100644 index 00000000..40cbaed2 Binary files /dev/null and b/docs/img/website-userguide-18.png differ diff --git a/docs/img/website-userguide-19.png b/docs/img/website-userguide-19.png new file mode 100644 index 00000000..8b000274 Binary files /dev/null and b/docs/img/website-userguide-19.png differ diff --git a/docs/img/website-userguide-2.png b/docs/img/website-userguide-2.png new file mode 100644 index 00000000..540f3964 Binary files /dev/null and b/docs/img/website-userguide-2.png differ diff --git a/docs/img/website-userguide-20.png b/docs/img/website-userguide-20.png new file mode 100644 index 00000000..2427d964 Binary files /dev/null and b/docs/img/website-userguide-20.png differ diff --git a/docs/img/website-userguide-3.png b/docs/img/website-userguide-3.png new file mode 100644 index 00000000..8a429bd4 Binary files /dev/null and b/docs/img/website-userguide-3.png differ diff --git a/docs/img/website-userguide-4.png b/docs/img/website-userguide-4.png new file mode 100644 index 00000000..05603584 Binary files /dev/null and b/docs/img/website-userguide-4.png differ diff --git a/docs/img/website-userguide-5.png b/docs/img/website-userguide-5.png new file mode 100644 index 00000000..cd4589e4 Binary files /dev/null and b/docs/img/website-userguide-5.png differ diff --git a/docs/img/website-userguide-6.png b/docs/img/website-userguide-6.png new file mode 100644 index 00000000..f20c49bd Binary files /dev/null and b/docs/img/website-userguide-6.png differ diff --git a/docs/img/website-userguide-7.png b/docs/img/website-userguide-7.png new file mode 100644 index 00000000..d8bccfa1 Binary files /dev/null and b/docs/img/website-userguide-7.png differ diff --git a/docs/img/website-userguide-8.png b/docs/img/website-userguide-8.png new file mode 100644 index 00000000..f34b60f9 Binary files /dev/null and b/docs/img/website-userguide-8.png differ diff --git a/docs/img/website-userguide-9.png b/docs/img/website-userguide-9.png new file mode 100644 index 00000000..e36cfc70 Binary files /dev/null and b/docs/img/website-userguide-9.png differ diff --git a/docusaurus.config.js b/docusaurus.config.js index 86165616..c47446e7 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -35,7 +35,7 @@ const config = { }, docs: { sidebarPath: require.resolve("./sidebars.js"), - // breadcrumbs: false, + breadcrumbs: false, }, blog: { showReadingTime: true, diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json index 2723dc3d..4958287f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -1,10 +1,10 @@ { "version.label": { - "message": "Next", + "message": "上一页", "description": "The label for version current" }, "sidebar.docs.category.Guide": { - "message": "Guide", + "message": "指南", "description": "The label for category Guide in sidebar docs" } } diff --git a/i18n/zh/docusaurus-theme-classic/navbar.json b/i18n/zh/docusaurus-theme-classic/navbar.json index 497a7970..9b64c35b 100644 --- a/i18n/zh/docusaurus-theme-classic/navbar.json +++ b/i18n/zh/docusaurus-theme-classic/navbar.json @@ -8,7 +8,7 @@ "description": "The alt text of navbar logo" }, "item.label.Documentation": { - "message": "Documentation", + "message": "文档", "description": "Navbar item with label Documentation" } }