diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index a4372656c..2d49f0d6e 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,5 +3,5 @@ blank_issues_enabled: true contact_links: - name: "\1F4AC Jan Discussions" - url: "https://github.com/orgs/janhq/discussions/categories/q-a" + url: "https://github.com/orgs/menloresearch/discussions/categories/q-a" about: "Get help, discuss features & roadmap, and share your projects" \ No newline at end of file diff --git a/.github/workflows/jan-electron-build-beta.yml b/.github/workflows/jan-electron-build-beta.yml index 9cae31d67..61ff717ac 100644 --- a/.github/workflows/jan-electron-build-beta.yml +++ b/.github/workflows/jan-electron-build-beta.yml @@ -9,31 +9,6 @@ jobs: get-update-version: uses: ./.github/workflows/template-get-update-version.yml - create-draft-release: - runs-on: ubuntu-latest - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - outputs: - upload_url: ${{ steps.create_release.outputs.upload_url }} - version: ${{ steps.get_version.outputs.version }} - permissions: - contents: write - steps: - - name: Extract tag name without v prefix - id: get_version - run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV && echo "::set-output name=version::${GITHUB_REF#refs/tags/v}" - env: - GITHUB_REF: ${{ github.ref }} - - name: Create Draft Release - id: create_release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ github.ref_name }} - token: ${{ secrets.GITHUB_TOKEN }} - name: "${{ env.VERSION }}" - draft: true - prerelease: false - generate_release_notes: true - build-macos: uses: ./.github/workflows/template-build-macos.yml secrets: inherit @@ -43,6 +18,8 @@ jobs: public_provider: github new_version: ${{ needs.get-update-version.outputs.new_version }} beta: true + nightly: false + cortex_api_port: "39271" build-windows-x64: uses: ./.github/workflows/template-build-windows-x64.yml @@ -53,6 +30,8 @@ jobs: public_provider: github new_version: ${{ needs.get-update-version.outputs.new_version }} beta: true + nightly: false + cortex_api_port: "39271" build-linux-x64: uses: ./.github/workflows/template-build-linux-x64.yml @@ -63,9 +42,11 @@ jobs: public_provider: github new_version: ${{ needs.get-update-version.outputs.new_version }} beta: true + nightly: false + cortex_api_port: "39271" sync-temp-to-latest: - needs: [build-macos, create-draft-release, build-windows-x64, build-linux-x64] + needs: [build-macos, build-windows-x64, build-linux-x64] runs-on: ubuntu-latest permissions: contents: write @@ -82,19 +63,15 @@ jobs: AWS_DEFAULT_REGION: ${{ secrets.DELTA_AWS_REGION }} AWS_EC2_METADATA_DISABLED: "true" - - name: set release to prerelease - run: | - gh release edit v${{ needs.create-draft-release.outputs.version }} --draft=false --prerelease - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - noti-discord-and-update-url-readme: - needs: [build-macos, create-draft-release, build-windows-x64, build-linux-x64, sync-temp-to-latest] + needs: [build-macos, get-update-version, build-windows-x64, build-linux-x64, sync-temp-to-latest] runs-on: ubuntu-latest steps: - name: Set version to environment variable run: | - echo "VERSION=${{ needs.create-draft-release.outputs.version }}" >> $GITHUB_ENV + VERSION=${{ needs.get-update-version.outputs.new_version }} + VERSION="${VERSION#v}" + echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Notify Discord uses: Ilshidur/action-discord@master @@ -105,6 +82,5 @@ jobs: - macOS Universal: https://delta.jan.ai/beta/jan-beta-mac-universal-{{ VERSION }}.dmg - Linux Deb: https://delta.jan.ai/beta/jan-beta-linux-amd64-{{ VERSION }}.deb - Linux AppImage: https://delta.jan.ai/beta/jan-beta-linux-x86_64-{{ VERSION }}.AppImage - - Github Release URL: https://github.com/janhq/jan/releases/tag/v{{ VERSION }} env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_JAN_BETA }} \ No newline at end of file diff --git a/.github/workflows/jan-electron-build-nightly.yml b/.github/workflows/jan-electron-build-nightly.yml index e08a35169..af5bab195 100644 --- a/.github/workflows/jan-electron-build-nightly.yml +++ b/.github/workflows/jan-electron-build-nightly.yml @@ -55,6 +55,9 @@ jobs: ref: ${{ needs.set-public-provider.outputs.ref }} public_provider: ${{ needs.set-public-provider.outputs.public_provider }} new_version: ${{ needs.get-update-version.outputs.new_version }} + nightly: true + beta: false + cortex_api_port: "39261" build-windows-x64: uses: ./.github/workflows/template-build-windows-x64.yml @@ -64,8 +67,9 @@ jobs: ref: ${{ needs.set-public-provider.outputs.ref }} public_provider: ${{ needs.set-public-provider.outputs.public_provider }} new_version: ${{ needs.get-update-version.outputs.new_version }} - - + nightly: true + beta: false + cortex_api_port: "39261" build-linux-x64: uses: ./.github/workflows/template-build-linux-x64.yml secrets: inherit @@ -74,6 +78,9 @@ jobs: ref: ${{ needs.set-public-provider.outputs.ref }} public_provider: ${{ needs.set-public-provider.outputs.public_provider }} new_version: ${{ needs.get-update-version.outputs.new_version }} + nightly: true + beta: false + cortex_api_port: "39261" sync-temp-to-latest: needs: [set-public-provider, build-windows-x64, build-linux-x64, build-macos] @@ -141,4 +148,3 @@ jobs: RUN_ID=${{ github.run_id }} COMMENT="This is the build for this pull request. You can download it from the Artifacts section here: [Build URL](https://github.com/${{ github.repository }}/actions/runs/${RUN_ID})." gh pr comment $PR_URL --body "$COMMENT" - \ No newline at end of file diff --git a/.github/workflows/jan-electron-build.yml b/.github/workflows/jan-electron-build.yml index 3ca4a1fe2..7d69a5c12 100644 --- a/.github/workflows/jan-electron-build.yml +++ b/.github/workflows/jan-electron-build.yml @@ -40,6 +40,8 @@ jobs: with: ref: ${{ github.ref }} public_provider: github + beta: false + nightly: false new_version: ${{ needs.get-update-version.outputs.new_version }} build-windows-x64: @@ -49,6 +51,8 @@ jobs: with: ref: ${{ github.ref }} public_provider: github + beta: false + nightly: false new_version: ${{ needs.get-update-version.outputs.new_version }} build-linux-x64: @@ -58,6 +62,8 @@ jobs: with: ref: ${{ github.ref }} public_provider: github + beta: false + nightly: false new_version: ${{ needs.get-update-version.outputs.new_version }} update_release_draft: @@ -82,4 +88,4 @@ jobs: # config-name: my-config.yml # disable-autolabeler: true env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/nightly-integrate-cortex-cpp.yml b/.github/workflows/nightly-integrate-cortex-cpp.yml index 8ddc40a11..066fbd28e 100644 --- a/.github/workflows/nightly-integrate-cortex-cpp.yml +++ b/.github/workflows/nightly-integrate-cortex-cpp.yml @@ -36,7 +36,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} run: | - curl -s https://api.github.com/repos/janhq/cortex/releases > /tmp/github_api_releases.json + curl -s https://api.github.com/repos/menloresearch/cortex/releases > /tmp/github_api_releases.json latest_prerelease_name=$(cat /tmp/github_api_releases.json | jq -r '.[] | select(.prerelease) | .name' | head -n 1) get_asset_count() { @@ -89,39 +89,39 @@ jobs: pull-requests: write steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 - token: ${{ secrets.PAT_SERVICE_ACCOUNT }} + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + token: ${{ secrets.PAT_SERVICE_ACCOUNT }} - - name: Wait for CI to pass - env: + - name: Wait for CI to pass + env: GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} - run: | - pr_number=${{ needs.update-submodule.outputs.pr_number }} - while true; do - ci_completed=$(gh pr checks $pr_number --json completedAt --jq '.[].completedAt') - if echo "$ci_completed" | grep -q "0001-01-01T00:00:00Z"; then - echo "CI is still running, waiting..." - sleep 60 - else - echo "CI has completed, checking states..." - ci_states=$(gh pr checks $pr_number --json state --jq '.[].state') - if echo "$ci_states" | grep -vqE "SUCCESS|SKIPPED"; then - echo "CI failed, exiting..." - exit 1 + run: | + pr_number=${{ needs.update-submodule.outputs.pr_number }} + while true; do + ci_completed=$(gh pr checks $pr_number --json completedAt --jq '.[].completedAt') + if echo "$ci_completed" | grep -q "0001-01-01T00:00:00Z"; then + echo "CI is still running, waiting..." + sleep 60 else - echo "CI passed, merging PR..." - break + echo "CI has completed, checking states..." + ci_states=$(gh pr checks $pr_number --json state --jq '.[].state') + if echo "$ci_states" | grep -vqE "SUCCESS|SKIPPED"; then + echo "CI failed, exiting..." + exit 1 + else + echo "CI passed, merging PR..." + break + fi fi - fi - done + done - - name: Merge the PR - env: + - name: Merge the PR + env: GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }} - run: | - pr_number=${{ needs.update-submodule.outputs.pr_number }} - gh pr merge $pr_number --merge --admin + run: | + pr_number=${{ needs.update-submodule.outputs.pr_number }} + gh pr merge $pr_number --merge --admin diff --git a/.github/workflows/template-build-jan-server.yml b/.github/workflows/template-build-jan-server.yml deleted file mode 100644 index 9bb772605..000000000 --- a/.github/workflows/template-build-jan-server.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: build-jan-server -on: - workflow_call: - inputs: - dockerfile_path: - required: false - type: string - default: './Dockerfile' - docker_image_tag: - required: true - type: string - default: 'ghcr.io/janhq/jan-server:dev-latest' - -jobs: - build: - runs-on: ubuntu-latest - env: - REGISTRY: ghcr.io - IMAGE_NAME: janhq/jan-server - permissions: - packages: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v3 - with: - context: . - file: ${{ inputs.dockerfile_path }} - push: true - tags: ${{ inputs.docker_image_tag }} \ No newline at end of file diff --git a/.github/workflows/template-build-linux-x64.yml b/.github/workflows/template-build-linux-x64.yml index 85b050e62..58b566931 100644 --- a/.github/workflows/template-build-linux-x64.yml +++ b/.github/workflows/template-build-linux-x64.yml @@ -23,6 +23,14 @@ on: required: false type: boolean default: false + nightly: + required: false + type: boolean + default: false + cortex_api_port: + required: false + type: string + default: null secrets: DELTA_AWS_S3_BUCKET_NAME: required: false @@ -43,6 +51,31 @@ jobs: with: ref: ${{ inputs.ref }} + - name: Replace Icons for Beta Build + if: inputs.beta == true && inputs.nightly != true + shell: bash + run: | + rm -rf electron/icons/* + + cp electron/icons_dev/jan-beta-512x512.png electron/icons/512x512.png + cp electron/icons_dev/jan-beta.ico electron/icons/icon.ico + cp electron/icons_dev/jan-beta.png electron/icons/icon.png + cp electron/icons_dev/jan-beta-tray@2x.png electron/icons/icon-tray@2x.png + cp electron/icons_dev/jan-beta-tray.png electron/icons/icon-tray.png + + - name: Replace Icons for Nightly Build + if: inputs.nightly == true && inputs.beta != true + shell: bash + run: | + rm -rf electron/icons/* + + cp electron/icons_dev/jan-nightly-512x512.png electron/icons/512x512.png + cp electron/icons_dev/jan-nightly.ico electron/icons/icon.ico + cp electron/icons_dev/jan-nightly.png electron/icons/icon.png + cp electron/icons_dev/jan-nightly-tray@2x.png electron/icons/icon-tray@2x.png + cp electron/icons_dev/jan-nightly-tray.png electron/icons/icon-tray.png + + - name: Installing node uses: actions/setup-node@v1 with: @@ -83,7 +116,7 @@ jobs: cat ./electron/package.json echo "------------------------" cat ./package.json - jq '.build.publish = [{"provider": "generic", "url": "https://delta.jan.ai/beta", "channel": "beta"}, {"provider": "github", "owner": "janhq", "repo": "jan", "channel": "beta"}, {"provider": "s3", "acl": null, "bucket": "${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}", "region": "${{ secrets.DELTA_AWS_REGION}}", "path": "temp-beta", "channel": "beta"}]' electron/package.json > /tmp/package.json + jq '.build.publish = [{"provider": "generic", "url": "https://delta.jan.ai/beta", "channel": "beta"}, {"provider": "s3", "acl": null, "bucket": "${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}", "region": "${{ secrets.DELTA_AWS_REGION}}", "path": "temp-beta", "channel": "beta"}]' electron/package.json > /tmp/package.json mv /tmp/package.json electron/package.json cat electron/package.json @@ -115,6 +148,7 @@ jobs: AWS_MAX_ATTEMPTS: '5' POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }} POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} + CORTEX_API_PORT: ${{ inputs.cortex_api_port }} - name: Build and publish app to github if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && inputs.public_provider == 'github' && inputs.beta == false @@ -150,4 +184,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: jan-linux-amd64-${{ inputs.new_version }}-AppImage - path: ./electron/dist/*.AppImage + path: ./electron/dist/*.AppImage \ No newline at end of file diff --git a/.github/workflows/template-build-macos.yml b/.github/workflows/template-build-macos.yml index 2eabd9ce2..a5e5cc724 100644 --- a/.github/workflows/template-build-macos.yml +++ b/.github/workflows/template-build-macos.yml @@ -23,6 +23,14 @@ on: required: false type: boolean default: false + nightly: + required: false + type: boolean + default: false + cortex_api_port: + required: false + type: string + default: null secrets: DELTA_AWS_S3_BUCKET_NAME: required: false @@ -52,6 +60,30 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ inputs.ref }} + + - name: Replace Icons for Beta Build + if: inputs.beta == true && inputs.nightly != true + shell: bash + run: | + rm -rf electron/icons/* + + cp electron/icons_dev/jan-beta-512x512.png electron/icons/512x512.png + cp electron/icons_dev/jan-beta.ico electron/icons/icon.ico + cp electron/icons_dev/jan-beta.png electron/icons/icon.png + cp electron/icons_dev/jan-beta-tray@2x.png electron/icons/icon-tray@2x.png + cp electron/icons_dev/jan-beta-tray.png electron/icons/icon-tray.png + + - name: Replace Icons for Nightly Build + if: inputs.nightly == true && inputs.beta != true + shell: bash + run: | + rm -rf electron/icons/* + + cp electron/icons_dev/jan-nightly-512x512.png electron/icons/512x512.png + cp electron/icons_dev/jan-nightly.ico electron/icons/icon.ico + cp electron/icons_dev/jan-nightly.png electron/icons/icon.png + cp electron/icons_dev/jan-nightly-tray@2x.png electron/icons/icon-tray@2x.png + cp electron/icons_dev/jan-nightly-tray.png electron/icons/icon-tray.png - name: Installing node uses: actions/setup-node@v1 @@ -99,7 +131,7 @@ jobs: cat ./electron/package.json echo "------------------------" cat ./package.json - jq '.build.publish = [{"provider": "generic", "url": "https://delta.jan.ai/beta", "channel": "beta"}, {"provider": "github", "owner": "janhq", "repo": "jan", "channel": "beta"}, {"provider": "s3", "acl": null, "bucket": "${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}", "region": "${{ secrets.DELTA_AWS_REGION}}", "path": "temp-beta", "channel": "beta"}]' electron/package.json > /tmp/package.json + jq '.build.publish = [{"provider": "generic", "url": "https://delta.jan.ai/beta", "channel": "beta"}, {"provider": "s3", "acl": null, "bucket": "${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}", "region": "${{ secrets.DELTA_AWS_REGION}}", "path": "temp-beta", "channel": "beta"}]' electron/package.json > /tmp/package.json mv /tmp/package.json electron/package.json cat electron/package.json @@ -154,6 +186,7 @@ jobs: AWS_MAX_ATTEMPTS: '5' POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }} POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} + CORTEX_API_PORT: ${{ inputs.cortex_api_port }} - name: Build and publish app to github if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && inputs.public_provider == 'github' && inputs.beta == false @@ -197,4 +230,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: jan-mac-universal-${{ inputs.new_version }} - path: ./electron/dist/*.dmg + path: ./electron/dist/*.dmg \ No newline at end of file diff --git a/.github/workflows/template-build-windows-x64.yml b/.github/workflows/template-build-windows-x64.yml index a317b4960..9be028e15 100644 --- a/.github/workflows/template-build-windows-x64.yml +++ b/.github/workflows/template-build-windows-x64.yml @@ -23,6 +23,14 @@ on: required: false type: boolean default: false + nightly: + required: false + type: boolean + default: false + cortex_api_port: + required: false + type: string + default: null secrets: DELTA_AWS_S3_BUCKET_NAME: required: false @@ -52,6 +60,30 @@ jobs: with: ref: ${{ inputs.ref }} + - name: Replace Icons for Beta Build + if: inputs.beta == true && inputs.nightly != true + shell: bash + run: | + rm -rf electron/icons/* + + cp electron/icons_dev/jan-beta-512x512.png electron/icons/512x512.png + cp electron/icons_dev/jan-beta.ico electron/icons/icon.ico + cp electron/icons_dev/jan-beta.png electron/icons/icon.png + cp electron/icons_dev/jan-beta-tray@2x.png electron/icons/icon-tray@2x.png + cp electron/icons_dev/jan-beta-tray.png electron/icons/icon-tray.png + + - name: Replace Icons for Nightly Build + if: inputs.nightly == true && inputs.beta != true + shell: bash + run: | + rm -rf electron/icons/* + + cp electron/icons_dev/jan-nightly-512x512.png electron/icons/512x512.png + cp electron/icons_dev/jan-nightly.ico electron/icons/icon.ico + cp electron/icons_dev/jan-nightly.png electron/icons/icon.png + cp electron/icons_dev/jan-nightly-tray@2x.png electron/icons/icon-tray@2x.png + cp electron/icons_dev/jan-nightly-tray.png electron/icons/icon-tray.png + - name: Installing node uses: actions/setup-node@v1 with: @@ -108,7 +140,7 @@ jobs: cat ./package.json echo "------------------------" cat ./electron/scripts/uninstaller.nsh - jq '.build.publish = [{"provider": "generic", "url": "https://delta.jan.ai/beta", "channel": "beta"}, {"provider": "github", "owner": "janhq", "repo": "jan", "channel": "beta"}, {"provider": "s3", "acl": null, "bucket": "${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}", "region": "${{ secrets.DELTA_AWS_REGION}}", "path": "temp-beta", "channel": "beta"}]' electron/package.json > /tmp/package.json + jq '.build.publish = [{"provider": "generic", "url": "https://delta.jan.ai/beta", "channel": "beta"}, {"provider": "s3", "acl": null, "bucket": "${{ secrets.DELTA_AWS_S3_BUCKET_NAME }}", "region": "${{ secrets.DELTA_AWS_REGION}}", "path": "temp-beta", "channel": "beta"}]' electron/package.json > /tmp/package.json mv /tmp/package.json electron/package.json cat electron/package.json @@ -153,6 +185,7 @@ jobs: AWS_MAX_ATTEMPTS: '5' POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }} POSTHOG_HOST: ${{ secrets.POSTHOG_HOST }} + CORTEX_API_PORT: ${{ inputs.cortex_api_port }} - name: Build app and publish app to github if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && inputs.public_provider == 'github' && inputs.beta == false @@ -193,4 +226,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: jan-win-x64-${{ inputs.new_version }} - path: ./electron/dist/*.exe + path: ./electron/dist/*.exe \ No newline at end of file diff --git a/.github/workflows/template-get-update-version.yml b/.github/workflows/template-get-update-version.yml index 24cfe4a03..97340be81 100644 --- a/.github/workflows/template-get-update-version.yml +++ b/.github/workflows/template-get-update-version.yml @@ -13,46 +13,46 @@ jobs: outputs: new_version: ${{ steps.version_update.outputs.new_version }} steps: - - name: Install jq - uses: dcarbone/install-jq-action@v2.0.1 + - name: Install jq + uses: dcarbone/install-jq-action@v2.0.1 - - name: Get tag - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') - id: tag - uses: dawidd6/action-get-tag@v1 + - name: Get tag + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + id: tag + uses: dawidd6/action-get-tag@v1 - - name: Update app version based on latest release tag with build number - id: version_update - run: | - # Function to get the latest release tag - get_latest_tag() { - local retries=0 - local max_retries=3 - local tag - while [ $retries -lt $max_retries ]; do - tag=$(curl -s https://api.github.com/repos/janhq/jan/releases/latest | jq -r .tag_name) - if [ -n "$tag" ] && [ "$tag" != "null" ]; then - echo $tag - return - else - let retries++ - echo "Retrying... ($retries/$max_retries)" - sleep 2 - fi - done - echo "Failed to fetch latest tag after $max_retries attempts." - exit 1 - } + - name: Update app version based on latest release tag with build number + id: version_update + run: | + # Function to get the latest release tag + get_latest_tag() { + local retries=0 + local max_retries=3 + local tag + while [ $retries -lt $max_retries ]; do + tag=$(curl -s https://api.github.com/repos/menloresearch/jan/releases/latest | jq -r .tag_name) + if [ -n "$tag" ] && [ "$tag" != "null" ]; then + echo $tag + return + else + let retries++ + echo "Retrying... ($retries/$max_retries)" + sleep 2 + fi + done + echo "Failed to fetch latest tag after $max_retries attempts." + exit 1 + } - if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}; then - echo "Tag detected, set output follow tag" - echo "::set-output name=new_version::${{ steps.tag.outputs.tag }}" - else - # Get the latest release tag from GitHub API - LATEST_TAG=$(get_latest_tag) - - # Remove the 'v' and append the build number to the version - new_version="${LATEST_TAG#v}-${GITHUB_RUN_NUMBER}" - echo "New version: $new_version" - echo "::set-output name=new_version::$new_version" - fi \ No newline at end of file + if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}; then + echo "Tag detected, set output follow tag" + echo "::set-output name=new_version::${{ steps.tag.outputs.tag }}" + else + # Get the latest release tag from GitHub API + LATEST_TAG=$(get_latest_tag) + + # Remove the 'v' and append the build number to the version + new_version="${LATEST_TAG#v}-${GITHUB_RUN_NUMBER}" + echo "New version: $new_version" + echo "::set-output name=new_version::$new_version" + fi diff --git a/.github/workflows/template-noti-discord-and-update-url-readme.yml b/.github/workflows/template-noti-discord-and-update-url-readme.yml index 59ad3c7be..282e0aa76 100644 --- a/.github/workflows/template-noti-discord-and-update-url-readme.yml +++ b/.github/workflows/template-noti-discord-and-update-url-readme.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 with: - fetch-depth: "0" + fetch-depth: '0' token: ${{ secrets.PAT_SERVICE_ACCOUNT }} ref: ${{ inputs.ref }} @@ -51,6 +51,6 @@ jobs: - macOS Universal: https://delta.jan.ai/nightly/jan-nightly-mac-universal-{{ VERSION }}.dmg - Linux Deb: https://delta.jan.ai/nightly/jan-nightly-linux-amd64-{{ VERSION }}.deb - Linux AppImage: https://delta.jan.ai/nightly/jan-nightly-linux-x86_64-{{ VERSION }}.AppImage - - Github action run: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }} + - Github action run: https://github.com/menloresearch/jan/actions/runs/{{ GITHUB_RUN_ID }} env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} \ No newline at end of file + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.husky/pre-commit b/.husky/pre-commit index 53c4e577e..94c03b512 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -npx oxlint@latest --fix \ No newline at end of file +yarn lint --fix --quiet \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ea90e69c..2a254fb49 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,8 +6,8 @@ First off, thank you for considering contributing to jan. It's people like you t ### Reporting Bugs -- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/janhq/jan/issues). -- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/janhq/jan/issues/new). +- **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/menloresearch/jan/issues). +- If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/menloresearch/jan/issues/new). ### Suggesting Enhancements @@ -29,4 +29,4 @@ First off, thank you for considering contributing to jan. It's people like you t ## Additional Notes -Thank you for contributing to jan! \ No newline at end of file +Thank you for contributing to jan! diff --git a/README.md b/README.md index 8052a34dc..fb820ddf9 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,18 @@
-
-
-
-
+
+
+
+
Getting Started - Docs - - Changelog - - Bug reports + - Changelog + - Bug reports - Discord
@@ -23,10 +23,9 @@ ⚠️ Jan is currently in Development: Expect breaking changes and bugs! - Jan is a ChatGPT-alternative that runs 100% offline on your device. Our goal is to make it easy for a layperson to download and run LLMs and use AI with **full control** and **privacy**. -Jan is powered by [Cortex](https://github.com/janhq/cortex.cpp), our embeddable local AI engine that runs on any hardware. +Jan is powered by [Cortex](https://github.com/menloresearch/cortex.cpp), our embeddable local AI engine that runs on any hardware. From PCs to multi-GPU clusters, Jan & Cortex supports universal architectures: - [x] NVIDIA GPUs (fast) @@ -36,7 +35,8 @@ From PCs to multi-GPU clusters, Jan & Cortex supports universal architectures: - [x] Windows x64 #### Features: -- [Model Library](https://jan.ai/docs/models/manage-models#add-models) with popular LLMs like Llama, Gemma, Mistral, or Qwen + +- [Model Library](https://jan.ai/docs/models/manage-models#add-models) with popular LLMs like Llama, Gemma, Mistral, or Qwen - Connect to [Remote AI APIs](https://jan.ai/docs/remote-models/openai) like Groq and OpenRouter - Local API Server with OpenAI-equivalent API - [Extensions](https://jan.ai/docs/extensions) for customizing Jan @@ -54,25 +54,25 @@ From PCs to multi-GPU clusters, Jan & Cortex supports universal architectures:
+
jan.exe
+
jan.dmg
+
jan.deb
+
jan.AppImage
+
jan.exe
+
jan.dmg
+
jan.deb
+
jan.AppImage
+
jan.exe
+
jan.dmg
+
jan.deb
+
jan.AppImage
Latest release updates from the Jan team. Check out our
Roadmap
@@ -150,7 +150,7 @@ const Changelog = () => {
-Cloud models cannot be deleted, but you can hide them by disabling their respective provider engines in **Settings** > **Engines**.
+You can manage & hide respective provider engines in **Settings** > **Engines**:

+
+
+### Add Models
+1. In your respective provider's settings page, click **Add Model**
+2. Enter the **model ID**. Check detailed model IDs in the provider's model list, for example, `claude-3-opus-latest`.
+3. A success message will appear when the model is added
+
+
+
+
+
+### Delete Models
+1. In your respective provider's settings page, choose the model you want to delete
+2. Click **Trash Bin** (
+
\ No newline at end of file
diff --git a/docs/src/pages/docs/remote-models/_meta.json b/docs/src/pages/docs/remote-models/_meta.json
index 529047774..62709526e 100644
--- a/docs/src/pages/docs/remote-models/_meta.json
+++ b/docs/src/pages/docs/remote-models/_meta.json
@@ -7,6 +7,14 @@
"title": "Cohere",
"href": "/docs/remote-models/cohere"
},
+ "deepseek": {
+ "title": "DeepSeek",
+ "href": "/docs/remote-models/deepseek"
+ },
+ "google": {
+ "title": "Google",
+ "href": "/docs/remote-models/google"
+ },
"groq": {
"title": "Groq",
"href": "/docs/remote-models/groq"
@@ -20,7 +28,7 @@
"href": "/docs/remote-models/mistralai"
},
"nvidia-nim": {
- "title": "Nvidia NIM",
+ "title": "Nvidia",
"href": "/docs/remote-models/nvidia-nim"
},
"openai": {
diff --git a/docs/src/pages/docs/remote-models/anthropic.mdx b/docs/src/pages/docs/remote-models/anthropic.mdx
index 8b7fdbccd..cf83782b9 100644
--- a/docs/src/pages/docs/remote-models/anthropic.mdx
+++ b/docs/src/pages/docs/remote-models/anthropic.mdx
@@ -60,7 +60,7 @@ There are two ways to add your Anthropic API keys in Jan:
## Available Anthropic Models
-Jan automatically includes Anthropic's available models. In case you want to use a specific Anthropic model that you cannot find in **Jan**, follow instructions in [Manual Setup](/docs/models/manage-models#4-manual-setup) to add custom models:
+Jan automatically includes Anthropic's available models. In case you want to use a specific Anthropic model that you cannot find in **Jan**, follow instructions in [Add Cloud Models](/docs/models/manage-models#add-models-1):
- See list of available models in [Anthropic Models](https://docs.anthropic.com/claude/docs/models-overview).
- The `id` property must match the model name in the list. For example, `claude-3-opus-20240229`, `claude-3-sonnet-20240229`, or `claude-2.1`.
diff --git a/docs/src/pages/docs/remote-models/cohere.mdx b/docs/src/pages/docs/remote-models/cohere.mdx
index 41e60431d..c53e7e84b 100644
--- a/docs/src/pages/docs/remote-models/cohere.mdx
+++ b/docs/src/pages/docs/remote-models/cohere.mdx
@@ -60,7 +60,7 @@ There are two ways to add your Cohere API keys in Jan:
## Available Cohere Models
-Jan automatically includes Cohere's available models. In case you want to use a specific Cohere model that you cannot find in **Jan**, follow instructions in [Manual Setup](/docs/models/manage-models#4-manual-setup) to add custom models:
+Jan automatically includes Cohere's available models. In case you want to use a specific Cohere model that you cannot find in **Jan**, follow instructions in [Add Cloud Models](/docs/models/manage-models#add-models-1):
- See list of available models in [Cohere Documentation](https://docs.cohere.com/v2/docs/models).
- The `id` property must match the model name in the list. For example, `command-nightly` or `command-light`.
diff --git a/docs/src/pages/docs/remote-models/deepseek.mdx b/docs/src/pages/docs/remote-models/deepseek.mdx
new file mode 100644
index 000000000..67b596846
--- /dev/null
+++ b/docs/src/pages/docs/remote-models/deepseek.mdx
@@ -0,0 +1,86 @@
+---
+title: DeepSeek
+description: Learn how to integrate DeepSeek with Jan for enhanced functionality.
+keywords:
+ [
+ Anthropic API,
+ Jan,
+ Jan AI,
+ ChatGPT alternative,
+ conversational AI,
+ large language model,
+ integration,
+ Anthropic integration,
+ API integration
+ ]
+---
+
+import { Callout, Steps } from 'nextra/components'
+import { Settings, Plus } from 'lucide-react'
+
+# DeepSeek
+
+Jan supports [DeepSeek](https://www.deepseek.com/) API integration, allowing you to use DeepSeek models through Jan's interface.
+
+## Integrate DeepSeek API with Jan
+
+
+
+
+
+### Step 3: Start Using DeepSeek's Models
+
+1. In any existing **Threads** or create a new one
+2. Select an DeepSeek model from **model selector**
+3. Start chatting
+
+
+
+
+### Step 3: Start Using Google's Models
+
+1. In any existing **Threads** or create a new one
+2. Select an Google model from **model selector**
+3. Start chatting
+
@@ -58,14 +58,14 @@ There are two ways to add your Nvidia NIM API keys in Jan:
### Step 3: Start Using Nvidia NIM Models
1. In any existing **Threads** or create a new one
-2. Select a NVIDIA NIM model from **model selector**
+2. Select a Nvidia model from **model selector**
3. Start chatting