diff --git a/.github/workflows/pushdocker.yml b/.github/workflows/pushdocker.yml index 0c8ef52bf..74a208ca9 100644 --- a/.github/workflows/pushdocker.yml +++ b/.github/workflows/pushdocker.yml @@ -1,4 +1,4 @@ -# 在标签发布的时候 做2个事情 +# When tagging a release, do two things # 1. name: Push To Docker @@ -21,7 +21,7 @@ jobs: - name: Check out git repository uses: actions/checkout@main - # 获取版本号 workflow不支持 所以用插件 + # Unable to obtain version number. Since the workflow doesn't support it, we'll use a plugin - name: Create version id: chat2db_version uses: bhowell2/github-substring-action@1.0.1 @@ -30,12 +30,12 @@ jobs: index_of_str: "refs/tags/v" - # 输出基础信息 + # Outputting basic information - name: Print basic information run: | echo "current version: ${{ steps.chat2db_version.outputs.substring }}" - # 安装node + # Install Node.js - name: Install Node.js uses: actions/setup-node@main with: @@ -43,7 +43,7 @@ jobs: cache: "yarn" cache-dependency-path: chat2db-client/yarn.lock - # 构建静态文件信息 + # Build static file information - name: Yarn install & build & copy run: | cd chat2db-client @@ -52,7 +52,7 @@ jobs: cp -r dist ../chat2db-server/chat2db-server-web-start/src/main/resources/static/front cp -r dist/index.html ../chat2db-server/chat2db-server-web-start/src/main/resources/thymeleaf/ - # 安装java + # Install java and maven - name: Install Java and Maven uses: actions/setup-java@main with: @@ -60,7 +60,7 @@ jobs: distribution: "adopt" cache: "maven" - # 编译服务端java版本 + # Compile server-side Java version - name: Build Java run: mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml @@ -72,14 +72,14 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - # 登录docker hub + # Log in docker hub - name: Log in to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # 打包发送到docker + # Packaging and sending to Docker - name: Build and push uses: docker/build-push-action@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 976204772..a510dad51 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,14 +2,14 @@ name: Build Client # Workflow's trigger -# 在创建标签的时候打包 +# Pack when creating tags on: push: tags: - v* # Workflow's jobs -# 一共需要3台电脑运行 +# A total of 3 computers are required to run # windows # macos-latest x86_64 # macos-latest arm64 @@ -31,7 +31,7 @@ jobs: - name: Check out git repository uses: actions/checkout@main - # 获取版本号 workflow不支持 所以用插件 + # Obtaining the version number is not supported by workflow, so a plug-in is used. - name: Create version id: chat2db_version uses: bhowell2/github-substring-action@1.0.1 @@ -39,13 +39,13 @@ jobs: value: ${{ github.ref }} index_of_str: "refs/tags/v" - # 输出基础信息 + # Output basic information - name: Print basic information run: | echo "current environment: ${{ env.CHAT2DB_ENVIRONMENT }}" echo "current version: ${{ steps.chat2db_version.outputs.substring }}" - # 安装jre Windows + # Install jre Windows - name: Install Jre for Windows if: ${{ runner.os == 'Windows' }} uses: actions/setup-java@main @@ -54,7 +54,7 @@ jobs: distribution: "temurin" java-package: "jre" - # 安装jre MacOS X64 + # Install jre MacOS X64 - name: Install Jre MacOS X64 if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} uses: actions/setup-java@main @@ -63,7 +63,7 @@ jobs: distribution: "temurin" java-package: "jre" - # 安装jre MacOS arm64 + # Install jre MacOS arm64 - name: Install Jre MacOS arm64 if: ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }} uses: actions/setup-java@main @@ -73,7 +73,7 @@ jobs: java-package: "jre" architecture: "aarch64" - # 安装jre Linux + # Install jre Linux - name: Install Jre for Linux if: ${{ runner.os == 'Linux' }} uses: actions/setup-java@main @@ -82,26 +82,26 @@ jobs: distribution: "temurin" java-package: "jre" - # java.security 开放tls1 Windows + # java.security open tls1 Windows - name: Enable tls1 if: ${{ runner.os == 'Windows' }} run: | sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security" - # java.security 开放tls1 macOS + # java.security open tls1 macOS - name: Enable tls1 if: ${{ runner.os == 'macOS' }} run: | sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security - # 复制jre Windows + # Copy jre Windows - name: Copy Jre for Windows if: ${{ runner.os == 'Windows' }} run: | mkdir chat2db-client/static cp -r "${{ env.JAVA_HOME }}" chat2db-client/static/jre - # 复制jre macOS + # Copy jre macOS - name: Copy Jre for macOS if: ${{ runner.os == 'macOS' }} run: | @@ -109,7 +109,7 @@ jobs: cp -r $JAVA_HOME chat2db-client/static/jre chmod -R 777 chat2db-client/static/jre/ - # 复制jre Linux + # Copy jre Linux - name: Copy Jre for Linux if: ${{ runner.os == 'Linux' }} run: | @@ -117,7 +117,7 @@ jobs: cp -r $JAVA_HOME chat2db-client/static/jre chmod -R 777 chat2db-client/static/jre/ - # 安装node + # Install node - name: Install Node.js uses: actions/setup-node@main with: @@ -125,7 +125,7 @@ jobs: cache: "yarn" cache-dependency-path: chat2db-client/yarn.lock - # 安装java + # Install java - name: Install Java and Maven uses: actions/setup-java@main with: @@ -133,7 +133,7 @@ jobs: distribution: "temurin" cache: "maven" - # 构建静态文件信息 + # Build static file information - name: Yarn install & build & copy run: | cd chat2db-client @@ -145,7 +145,7 @@ jobs: yarn yarn run build - # 编译服务端java版本 + # Compile server-side java version - name: Build Java run: mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml @@ -160,7 +160,7 @@ jobs: echo -n ${{ steps.chat2db_version.outputs.substring }} > version cp -r version ./versions/ - # 复制服务端java 到指定位置 + # Copy server-side java to the specified location - name: Copy App run: | cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/${{ steps.chat2db_version.outputs.substring }}/static/ @@ -245,14 +245,14 @@ jobs: args: "-c.extraMetadata.version=${{ steps.chat2db_version.outputs.substring }} --linux" release: true - # 准备要需要的数据 Windows + # Prepare the required data Windows - name: Prepare upload for Windows if: runner.os == 'Windows' run: | mkdir oss_temp_file cp -r chat2db-client/release/*Setup*.exe ./oss_temp_file - # 准备要需要的数据 MacOS x86_64 + # Prepare the required data MacOS x86_64 - name: Prepare upload for MacOS x86_64 if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} run: | @@ -265,21 +265,21 @@ jobs: cd static/ && zip -r chat2db-server-start.zip ./ cp -r chat2db-server-start.zip ../../../../oss_temp_file - # 准备要需要的数据 MacOS arm64 + # Prepare the required data MacOS arm64 - name: Prepare upload for MacOS arm64 if: ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }} run: | mkdir oss_temp_file cp -r chat2db-client/release/*.dmg ./oss_temp_file - # 准备要需要的数据 Linux + # Prepare the required data Linux - name: Prepare upload for Linux if: runner.os == 'Linux' run: | mkdir oss_temp_file cp -r chat2db-client/release/*.AppImage ./oss_temp_file - # 把文件上传到OSS 方便下载 + # Upload files to OSS for easy downloading - name: Set up oss utils uses: yizhoumo/setup-ossutil@v1 with: @@ -291,7 +291,7 @@ jobs: run: | ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/release/${{ steps.chat2db_version.outputs.substring }}/ - # 构建完成通知 + # Build completion notification - name: Send dingtalk message for Windows if: ${{ runner.os == 'Windows' }} uses: ghostoy/dingtalk-action@master @@ -304,7 +304,7 @@ jobs: "text": "# Windows-release-打包完成通知 \n ![bang](https://oss.sqlgpt.cn/static/happy100.jpg) \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Windows下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB%20Setup%20${{ steps.chat2db_version.outputs.substring }}.exe](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB%20Setup%20${{ steps.chat2db_version.outputs.substring }}.exe) " } - # 构建完成通知 + # Build completion notification - name: Send dingtalk message for MacOS x86_64 if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} uses: ghostoy/dingtalk-action@master @@ -317,7 +317,7 @@ jobs: "text": "# MacOS-x86_64-release-打包完成通知 \n ![bang](https://oss.sqlgpt.cn/static/happy100.jpg) \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Intel芯片下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}.dmg](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}.dmg) \n ### jar包下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/chat2db-server-start.zip](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/chat2db-server-start.zip) " } - # 构建完成通知 + # Build completion notification - name: Send dingtalk message for MacOS arm64 if: ${{ runner.os == 'macOS' && matrix.arch == 'arm64' }} uses: ghostoy/dingtalk-action@master @@ -330,7 +330,7 @@ jobs: "text": "# MacOS-arm64-release-打包完成通知 \n ![bang](https://oss.sqlgpt.cn/static/happy100.jpg) \n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }}) \n ### Apple芯片下载地址:[https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}-arm64.dmg](https://oss.sqlgpt.cn/release/${{ steps.chat2db_version.outputs.substring }}/Chat2DB-${{ steps.chat2db_version.outputs.substring }}-arm64.dmg) " } - # 构建完成通知 + # Build completion notification - name: Send dingtalk message for Linux if: ${{ runner.os == 'Linux' }} uses: ghostoy/dingtalk-action@master diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml index 8ffe99e57..5ea5012f3 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/release_test.yml @@ -35,7 +35,7 @@ jobs: - name: Check out git repository uses: actions/checkout@main - # 安装JRE + # Install JRE - name: Install JRE uses: actions/setup-java@main with: @@ -44,7 +44,7 @@ jobs: java-package: "jre" # architecture: ${{ matrix.arch == 'arm64' && 'aarch64' || 'x64' }} - # 开放TLS + # OpenTLS - name: Enable TLS 1.0 and 1.1 in java.security run: | if [ "$RUNNER_OS" = "Windows" ]; then @@ -59,7 +59,7 @@ jobs: RUNNER_OS: ${{ runner.os }} JAVA_HOME: ${{ env.JAVA_HOME }} - # JRE拷贝到前端静态目录 + # Copy JRE to the front-end static directory - name: Copy JRE to static directory run: | mkdir -p chat2db-client/static @@ -71,7 +71,7 @@ jobs: env: JAVA_HOME: ${{ env.JAVA_HOME }} - # Linux中删除jre中相关文件 + # Delete related files in jre in Linux - if: ${{ runner.os == 'Linux' }} name: Delete File on Linux run: | @@ -80,7 +80,7 @@ jobs: rm -rf legal ls -la - # 安装Node.js + # Install Node.js - name: Install Node.js uses: actions/setup-node@main with: @@ -88,7 +88,7 @@ jobs: cache: "yarn" cache-dependency-path: chat2db-client/yarn.lock - # 安装Java + # Install Java - name: Install Java and Maven uses: actions/setup-java@main with: @@ -96,7 +96,7 @@ jobs: distribution: "temurin" cache: "maven" - # 打包Web前端资源 + # Packaging web front-end resources - name: Build FE Static run: | cd chat2db-client @@ -109,7 +109,7 @@ jobs: yarn run build - # 打包后端工程 & 发送到前端 + # Package backend project & send to frontend - name: Build BE Static run: | mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml @@ -118,7 +118,7 @@ jobs: cp -r chat2db-client/version chat2db-client/versions/ cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/99.0.${{ github.run_id }}/static/ - # 打包桌面端前端资源 + # Packaging desktop front-end resources - name: Prepare Build Electron run: | cd chat2db-client @@ -126,7 +126,7 @@ jobs: cp -r dist ./versions/99.0.${{ github.run_id }}/ rm -r dist - # 打包Electron + # Packaging Electron - name: Build/release Electron app uses: samuelmeuli/action-electron-builder@v1 with: @@ -143,7 +143,7 @@ jobs: -c.extraMetadata.version=99.0.${{ github.run_id }}-Test ${{ matrix.build_arg}} - # 公证&签名 Mac App + # Notarization & Signature Mac App - name: Notarize MacOS x86_64 App if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64' run: | @@ -159,7 +159,7 @@ jobs: - # Build Jar包 + # Build Jar - name: Prepare upload for Jar if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} run: | @@ -172,13 +172,13 @@ jobs: cd static/ && zip -r chat2db-server-start.zip ./ cp -r chat2db-server-start.zip ../../../../oss_temp_file - # 准备发往OSS的文件 + # Prepare files to be sent to OSS - name: Prepare upload for OSS run: | mkdir -p oss_temp_file cp -r chat2db-client/release/*${{ matrix.file_extension }} ./oss_temp_file - # 设置OSS + # Set up OSS - name: Set up oss utils uses: yizhoumo/setup-ossutil@v1 with: @@ -187,12 +187,12 @@ jobs: access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }} ossutil-version: "1.7.16" - # 上传到OSS + # Upload to OSS - name: Upload to OSS run: | ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/ - # 配置SSH 待上传到服务器 + # Configure SSH to be uploaded to the server - name: Install ssh key run: | mkdir -p ~/.ssh @@ -201,14 +201,14 @@ jobs: ssh-keyscan -t rsa ${{ secrets.SERVER_DOWNLOAD_HOST }} >> ~/.ssh/known_hosts eval `ssh-agent -s` ssh-add ~/.ssh/id_rsa - # 上传到服务器 + # upload to server - name: Upload package run: | ssh -t ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }} "mkdir -p ${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}" scp ./oss_temp_file/* ${{ secrets.SERVER_DOWNLOAD_USERNAME }}@${{ secrets.SERVER_DOWNLOAD_HOST }}:${{ secrets.SERVER_DOWNLOAD_PATH }}/test//99.0.${{ github.run_id }}/ - # 发送到DingTalk + # Send to DingTalk - name: Send dingtalk message uses: ghostoy/dingtalk-action@master with: @@ -220,7 +220,7 @@ jobs: "text": "# ${{ matrix.os }}-test-打包完成通知\n !\n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }})\n ### 下载地址:[${{matrix.file_name}}](${{matrix.file_name}})" } - # 发送Jar包地址到DingTalk + # Send Jar package address to DingTalk - if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} name: Send dingtalk message uses: ghostoy/dingtalk-action@master diff --git a/.github/workflows/release_test_2.yml b/.github/workflows/release_test_2.yml index 4bfcf9050..0e8d3ddc8 100644 --- a/.github/workflows/release_test_2.yml +++ b/.github/workflows/release_test_2.yml @@ -1,4 +1,4 @@ -name: Build Test Client +name: Build Test Client 2 on: push: @@ -11,31 +11,31 @@ jobs: fail-fast: false matrix: include: - - os: windows-latest - file_extension: ".exe" - file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test%20Setup%2099.0.${{ github.run_id }}-Test.exe" - build_arg: "--win --x64" - - os: macos-latest - arch: x86_64 - file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg" - file_extension: ".dmg" - build_arg: "--mac --x64" + # - os: windows-latest + # file_extension: ".exe" + # file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test%20Setup%2099.0.${{ github.run_id }}-Test.exe" + # build_arg: "--win --x64" + # - os: macos-latest + # arch: x86_64 + # file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg" + # file_extension: ".dmg" + # build_arg: "--mac --x64" - os: macos-latest arch: arm64 file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test-arm64.dmg" file_extension: ".dmg" - build_arg: "--mac --arm64" - - os: ubuntu-latest - file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage" - file_extension: ".AppImage" - build_arg: "--linux" + # build_arg: "--mac --arm64" + # - os: ubuntu-latest + # file_name: "https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/Chat2DB-Test-99.0.${{ github.run_id }}-Test.AppImage" + # file_extension: ".AppImage" + # build_arg: "--linux" runs-on: ${{ matrix.os }} steps: - name: Check out git repository uses: actions/checkout@main - # 安装JRE + # Install JRE - name: Install JRE uses: actions/setup-java@main with: @@ -44,7 +44,7 @@ jobs: java-package: "jre" # architecture: ${{ matrix.arch == 'arm64' && 'aarch64' || 'x64' }} - # 开放TLS + # Open TLS - name: Enable TLS 1.0 and 1.1 in java.security run: | if [ "$RUNNER_OS" = "Windows" ]; then @@ -59,7 +59,7 @@ jobs: RUNNER_OS: ${{ runner.os }} JAVA_HOME: ${{ env.JAVA_HOME }} - # JRE拷贝到前端静态目录 + # Copy JRE to the front-end static directory - name: Copy JRE to static directory run: | mkdir -p chat2db-client/static @@ -71,7 +71,7 @@ jobs: env: JAVA_HOME: ${{ env.JAVA_HOME }} - # Linux中删除jre中相关文件 + # Delete related files in jre in Linux - if: ${{ runner.os == 'Linux' }} name: Delete File on Linux run: | @@ -80,7 +80,7 @@ jobs: rm -rf legal ls -la - # 安装Node.js + # Install Node.js - name: Install Node.js uses: actions/setup-node@main with: @@ -88,7 +88,7 @@ jobs: cache: "yarn" cache-dependency-path: chat2db-client/yarn.lock - # 安装Java + # Install Java - name: Install Java and Maven uses: actions/setup-java@main with: @@ -96,7 +96,7 @@ jobs: distribution: "temurin" cache: "maven" - # 打包Web前端资源 + # Packaging web front-end resources - name: Build FE Static run: | cd chat2db-client @@ -108,7 +108,7 @@ jobs: yarn yarn run build - # 打包后端工程 & 发送到前端 + # Package backend project & send to frontend - name: Build BE Static run: | mvn clean package -B '-Dmaven.test.skip=true' -f chat2db-server/pom.xml @@ -117,7 +117,7 @@ jobs: cp -r chat2db-client/version chat2db-client/versions/ cp chat2db-server/chat2db-server-start/target/chat2db-server-start.jar chat2db-client/versions/99.0.${{ github.run_id }}/static/ - # 打包桌面端前端资源 + # Packaging desktop front-end resources - name: Prepare Build Electron run: | cd chat2db-client @@ -125,7 +125,7 @@ jobs: cp -r dist ./versions/99.0.${{ github.run_id }}/ rm -r dist - # 打包Electron + # Packing Electron - name: Build/release Electron app uses: samuelmeuli/action-electron-builder@v1 with: @@ -142,14 +142,14 @@ jobs: -c.extraMetadata.version=99.0.${{ github.run_id }}-Test ${{ matrix.build_arg}} - # 公证&签名 Mac App + # Notarization & Signature Mac App - name: Notarize MacOS x86_64 App if: matrix.os == 'macos-latest' && matrix.arch == 'x86_64' run: | xcrun notarytool store-credentials "Chat2DB" --apple-id "${{ secrets.MAC_APPLE_ID }}" --password "${{ secrets.MAC_APPLE_PASSWORD }}" --team-id "${{ secrets.MAC_TEAM_ID }}" xcrun notarytool submit chat2db-client/release/Chat2DB-Test-99.0.${{ github.run_id }}-Test.dmg --keychain-profile "Chat2DB" - # Build Jar包 + # Build Jar - name: Prepare upload for Jar if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} run: | @@ -162,13 +162,13 @@ jobs: cd static/ && zip -r chat2db-server-start.zip ./ cp -r chat2db-server-start.zip ../../../../oss_temp_file - # 准备发往OSS的文件 + # Prepare files to be sent to OSS - name: Prepare upload for OSS run: | mkdir -p oss_temp_file cp -r chat2db-client/release/*${{ matrix.file_extension }} ./oss_temp_file - # 设置OSS + # Set up OSS - name: Set up oss utils uses: yizhoumo/setup-ossutil@v1 with: @@ -177,12 +177,12 @@ jobs: access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }} ossutil-version: "1.7.16" - # 上传到OSS + # Upload to OSS - name: Upload to OSS run: | ossutil cp -rf --acl=public-read ./oss_temp_file/ oss://chat2db-client/test/99.0.${{ github.run_id }}/ - # 发送到DingTalk + # Send to DingTalk - name: Send dingtalk message uses: ghostoy/dingtalk-action@master with: @@ -194,7 +194,7 @@ jobs: "text": "# ${{ matrix.os }}-test-打包完成通知\n ![bang](https://oss.sqlgpt.cn/static/bang100.gif)\n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }})\n ### 下载地址:[${{matrix.file_name}}](${{matrix.file_name}})" } - # 发送Jar包地址到DingTalk + # Send Jar address to DingTalk - if: ${{ runner.os == 'macOS' && matrix.arch == 'x86_64' }} name: Send dingtalk message uses: ghostoy/dingtalk-action@master diff --git a/CHAT2DB_AI_SQL.md b/CHAT2DB_AI_SQL.md index 8f5ce9ffa..840bdfb13 100644 --- a/CHAT2DB_AI_SQL.md +++ b/CHAT2DB_AI_SQL.md @@ -1,21 +1,21 @@ # Chat2DB AI SQL功能使用说明 Chat2DB包含一系列基于ChatGPT的AI SQL使用功能,主要包括自然语言转SQL、SQL解释、SQL优化和SQL转换。 使用这些AI功能,可以将自然语言转换成本地查询SQL,而不仅仅是SQL查询伪代码;可以将SQL解释成自然语言,帮助用户理解复杂的SQL;可以针对慢SQL提供全方位的优化建议,提升查询效率;可以转换不同数据库类型的SQL语言,降低数据库迁移难度等等。 ## 使用配置 -### 点击设置 +### 点击设置【UI旧】 ### 配置AI -#### 配置OPENAI +#### 配置OPENAI【UI旧】 使用OPENAI的ChatSql功能需要满足两个条件 - 配置OPENAI_API_KEY,如没有OPENAI_API_KEY可加入答疑群根据群公告指引获取chat2db自定义key - 客户端网络可以连接到OPENAI官网,如果本地VPN未能全局生效,可以通过在客户端中设置网络代理HOST和PORT来保证网络连通性 -#### 配置自定义AI +#### 配置自定义AI【UI旧】 - 自定义AI可以是用户自己部署的任意AI模型,例如ChatGLM、ChatGPT、文心一言、通义千问等等,但是自定义的接口输入和输出需要符合自定义的协议规范才可快速使用,否则可能需要二次开发。代码中提供了两个DEMO,只需要配置自定义AI接口地址,以及接口是否流式输出即可查看。具体使用中可以参考DEMO接口来编写自定义接口,或者直接在DEMO接口中进行二次开发,封装自己的自定义接口 - 自定义的流式输出接口配置DEMO - 自定义的非流式输出接口配置DEMO -## 自然语言转SQL +## 自然语言转SQL【UI旧】 ### 功能描述 输入自然语言,选中执行并传入查询相关的表结构信息,则会返回相应的SQL - 输入样例:查询学生小明的各科目成绩,并传入关联数据表course,score,student,student_course diff --git a/README.md b/README.md index 3c576a5de..3d854876c 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Languages: English | [中文](README_CN.md) Official website:[Chat2DB](https://sqlgpt.cn/en)