diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml
index 15f35155ae..81c247bfba 100644
--- a/.github/workflows/api-tests.yml
+++ b/.github/workflows/api-tests.yml
@@ -27,6 +27,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Setup Poetry and Python ${{ matrix.python-version }}
uses: ./.github/actions/setup-poetry
diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
index 6e5255011b..cea464442c 100644
--- a/.github/workflows/build-push.yml
+++ b/.github/workflows/build-push.yml
@@ -80,10 +80,12 @@ jobs:
cache-to: type=gha,mode=max,scope=${{ matrix.service_name }}
- name: Export digest
+ env:
+ DIGEST: ${{ steps.build.outputs.digest }}
run: |
mkdir -p /tmp/digests
- digest="${{ steps.build.outputs.digest }}"
- touch "/tmp/digests/${digest#sha256:}"
+ sanitized_digest=${DIGEST#sha256:}
+ touch "/tmp/digests/${sanitized_digest}"
- name: Upload digest
uses: actions/upload-artifact@v4
@@ -133,10 +135,15 @@ jobs:
- name: Create manifest list and push
working-directory: /tmp/digests
+ env:
+ IMAGE_NAME: ${{ env[matrix.image_name_env] }}
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
- $(printf '${{ env[matrix.image_name_env] }}@sha256:%s ' *)
+ $(printf "$IMAGE_NAME@sha256:%s " *)
- name: Inspect image
+ env:
+ IMAGE_NAME: ${{ env[matrix.image_name_env] }}
+ IMAGE_VERSION: ${{ steps.meta.outputs.version }}
run: |
- docker buildx imagetools inspect ${{ env[matrix.image_name_env] }}:${{ steps.meta.outputs.version }}
+ docker buildx imagetools inspect "$IMAGE_NAME:$IMAGE_VERSION"
diff --git a/.github/workflows/db-migration-test.yml b/.github/workflows/db-migration-test.yml
index 7c8263b10a..69bff839a6 100644
--- a/.github/workflows/db-migration-test.yml
+++ b/.github/workflows/db-migration-test.yml
@@ -20,6 +20,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Setup Poetry and Python
uses: ./.github/actions/setup-poetry
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
new file mode 100644
index 0000000000..cf7e77b4b8
--- /dev/null
+++ b/.github/workflows/docker-build.yml
@@ -0,0 +1,47 @@
+name: Build docker image
+
+on:
+ pull_request:
+ branches:
+ - "main"
+ paths:
+ - api/Dockerfile
+ - web/Dockerfile
+
+concurrency:
+ group: docker-build-${{ github.head_ref || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ build-docker:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ include:
+ - service_name: "api-amd64"
+ platform: linux/amd64
+ context: "api"
+ - service_name: "api-arm64"
+ platform: linux/arm64
+ context: "api"
+ - service_name: "web-amd64"
+ platform: linux/amd64
+ context: "web"
+ - service_name: "web-arm64"
+ platform: linux/arm64
+ context: "web"
+ steps:
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Build Docker Image
+ uses: docker/build-push-action@v6
+ with:
+ push: false
+ context: "{{defaultContext}}:${{ matrix.context }}"
+ platforms: ${{ matrix.platform }}
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
diff --git a/.github/workflows/expose_service_ports.sh b/.github/workflows/expose_service_ports.sh
index d3146cd90d..16f24439e6 100755
--- a/.github/workflows/expose_service_ports.sh
+++ b/.github/workflows/expose_service_ports.sh
@@ -9,6 +9,6 @@ yq eval '.services["pgvecto-rs"].ports += ["5431:5432"]' -i docker/docker-compos
yq eval '.services["elasticsearch"].ports += ["9200:9200"]' -i docker/docker-compose.yaml
yq eval '.services.couchbase-server.ports += ["8091-8096:8091-8096"]' -i docker/docker-compose.yaml
yq eval '.services.couchbase-server.ports += ["11210:11210"]' -i docker/docker-compose.yaml
-yq eval '.services.tidb.ports += ["4000:4000"]' -i docker/docker-compose.yaml
+yq eval '.services.tidb.ports += ["4000:4000"]' -i docker/tidb/docker-compose.yaml
echo "Ports exposed for sandbox, weaviate, tidb, qdrant, chroma, milvus, pgvector, pgvecto-rs, elasticsearch, couchbase"
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 65e59945c6..69b9b16cd0 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -18,6 +18,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Check changed files
id: changed-files
@@ -60,6 +63,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Check changed files
id: changed-files
@@ -96,6 +102,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Check changed files
id: changed-files
@@ -124,6 +133,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Check changed files
id: changed-files
diff --git a/.github/workflows/tool-test-sdks.yaml b/.github/workflows/tool-test-sdks.yaml
index d3a4592eb5..d97d21c923 100644
--- a/.github/workflows/tool-test-sdks.yaml
+++ b/.github/workflows/tool-test-sdks.yaml
@@ -26,6 +26,9 @@ jobs:
steps:
- uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
diff --git a/.github/workflows/translate-i18n-base-on-english.yml b/.github/workflows/translate-i18n-base-on-english.yml
index b45793a05f..80b78a1311 100644
--- a/.github/workflows/translate-i18n-base-on-english.yml
+++ b/.github/workflows/translate-i18n-base-on-english.yml
@@ -16,6 +16,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 2 # last 2 commits
+ persist-credentials: false
- name: Check for file changes in i18n/en-US
id: check_files
diff --git a/.github/workflows/vdb-tests.yml b/.github/workflows/vdb-tests.yml
index fab0b8c426..5e3f7a557a 100644
--- a/.github/workflows/vdb-tests.yml
+++ b/.github/workflows/vdb-tests.yml
@@ -28,6 +28,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Setup Poetry and Python ${{ matrix.python-version }}
uses: ./.github/actions/setup-poetry
@@ -51,7 +54,15 @@ jobs:
- name: Expose Service Ports
run: sh .github/workflows/expose_service_ports.sh
- - name: Set up Vector Stores (TiDB, Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
+ - name: Set up Vector Store (TiDB)
+ uses: hoverkraft-tech/compose-action@v2.0.2
+ with:
+ compose-file: docker/tidb/docker-compose.yaml
+ services: |
+ tidb
+ tiflash
+
+ - name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
uses: hoverkraft-tech/compose-action@v2.0.2
with:
compose-file: |
@@ -67,7 +78,9 @@ jobs:
pgvector
chroma
elasticsearch
- tidb
+
+ - name: Check TiDB Ready
+ run: poetry run -P api python api/tests/integration_tests/vdb/tidb_vector/check_tiflash_ready.py
- name: Test Vector Stores
run: poetry run -P api bash dev/pytest/pytest_vdb.sh
diff --git a/.github/workflows/web-tests.yml b/.github/workflows/web-tests.yml
index d9f310c811..655b6ddb5d 100644
--- a/.github/workflows/web-tests.yml
+++ b/.github/workflows/web-tests.yml
@@ -22,6 +22,9 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ persist-credentials: false
- name: Check changed files
id: changed-files
diff --git a/.gitignore b/.gitignore
index 396a9108a8..296aeee873 100644
--- a/.gitignore
+++ b/.gitignore
@@ -163,6 +163,7 @@ docker/volumes/db/data/*
docker/volumes/redis/data/*
docker/volumes/weaviate/*
docker/volumes/qdrant/*
+docker/tidb/volumes/*
docker/volumes/etcd/*
docker/volumes/minio/*
docker/volumes/milvus/*
diff --git a/README.md b/README.md
index df6c481e78..2378cffe9b 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,9 @@
+
+
@@ -105,6 +108,72 @@ Please refer to our [FAQ](https://docs.dify.ai/getting-started/install-self-host
**7. Backend-as-a-Service**:
All of Dify's offerings come with corresponding APIs, so you could effortlessly integrate Dify into your own business logic.
+## Feature Comparison
+
| Feature | +Dify.AI | +LangChain | +Flowise | +OpenAI Assistants API | +
|---|---|---|---|---|
| Programming Approach | +API + App-oriented | +Python Code | +App-oriented | +API-oriented | +
| Supported LLMs | +Rich Variety | +Rich Variety | +Rich Variety | +OpenAI-only | +
| RAG Engine | +✅ | +✅ | +✅ | +✅ | +
| Agent | +✅ | +✅ | +❌ | +✅ | +
| Workflow | +✅ | +❌ | +✅ | +❌ | +
| Observability | +✅ | +✅ | +❌ | +❌ | +
| Enterprise Feature (SSO/Access control) | +✅ | +❌ | +❌ | +❌ | +
| Local Deployment | +✅ | +✅ | +✅ | +❌ | +