Skip to content

Commit

Permalink
Merge branch 'feat/model-provider-based-on-runtime' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh committed Jan 2, 2024
2 parents 6b44ed2 + f9440a3 commit bdf56c7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-api-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: langgenius/dify-api
tags: |
Expand All @@ -37,7 +37,7 @@ jobs:
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:api"
platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-web-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
Expand All @@ -27,7 +27,7 @@ jobs:

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: langgenius/dify-web
tags: |
Expand All @@ -37,7 +37,7 @@ jobs:
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: "{{defaultContext}}:web"
platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
Expand Down
13 changes: 4 additions & 9 deletions api/core/index/vector_index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from langchain.embeddings.base import Embeddings
from langchain.schema import Document, BaseRetriever
from langchain.vectorstores import VectorStore
from weaviate import UnexpectedStatusCodeException

from core.index.base import BaseIndex
from extensions.ext_database import db
Expand Down Expand Up @@ -139,10 +138,8 @@ def recreate_dataset(self, dataset: Dataset):

try:
self.delete()
except UnexpectedStatusCodeException as e:
if e.status_code != 400:
# 400 means index not exists
raise e
except Exception as e:
raise e

dataset_documents = db.session.query(DatasetDocument).filter(
DatasetDocument.dataset_id == dataset.id,
Expand Down Expand Up @@ -194,10 +191,8 @@ def create_qdrant_dataset(self, dataset: Dataset):

try:
self.delete()
except UnexpectedStatusCodeException as e:
if e.status_code != 400:
# 400 means index not exists
raise e
except Exception as e:
raise e

dataset_documents = db.session.query(DatasetDocument).filter(
DatasetDocument.dataset_id == dataset.id,
Expand Down
2 changes: 1 addition & 1 deletion web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ If your IDE is VSCode, rename `web/.vscode/settings.example.json` to `web/.vscod
Visit https://docs.dify.ai/getting-started/readme to view the full documentation.

## Community
The Dify community can be found on [Discord community](https://discord.com/invite/FngNHpbcY7), where you can ask questions, voice ideas, and share your projects.
The Dify community can be found on [Discord community](https://discord.gg/5AEfbxcd9k), where you can ask questions, voice ideas, and share your projects.
2 changes: 1 addition & 1 deletion web/app/components/datasets/create/step-two/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ const StepTwo = ({
</div>
</div>
<div className={s.formFooter}>
<Button type="primary" className={cn(s.button, '!h-8 text-primary-600')} onClick={confirmChangeCustomConfig}>{t('datasetCreation.stepTwo.preview')}</Button>
<Button type="primary" className={cn(s.button, '!h-8')} onClick={confirmChangeCustomConfig}>{t('datasetCreation.stepTwo.preview')}</Button>
<Button className={cn(s.button, 'ml-2 !h-8')} onClick={resetRules}>{t('datasetCreation.stepTwo.reset')}</Button>
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions web/app/components/header/account-dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@ export default function AppSelector({ isMobile }: IAppSelecotr) {
<ArrowUpRight className='hidden w-[14px] h-[14px] text-gray-500 group-hover:flex' />
</Link>
</Menu.Item>
<Menu.Item>
<Link
className={classNames(itemClassName, 'group justify-between')}
href='https://discord.gg/5AEfbxcd9k'
target='_blank'>
<div>{t('common.userProfile.community')}</div>
<ArrowUpRight className='hidden w-[14px] h-[14px] text-gray-500 group-hover:flex' />
</Link>
</Menu.Item>
<Menu.Item>
<Link
className={classNames(itemClassName, 'group justify-between')}
Expand Down
1 change: 1 addition & 0 deletions web/i18n/lang/common.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const translation = {
createWorkspace: 'Create Workspace',
helpCenter: 'Help',
roadmapAndFeedback: 'Roadmap & Feedback',
community: 'Community',
about: 'About',
logout: 'Log out',
},
Expand Down
1 change: 1 addition & 0 deletions web/i18n/lang/common.zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const translation = {
createWorkspace: '创建工作空间',
helpCenter: '帮助文档',
roadmapAndFeedback: '产品路线图 & 用户反馈',
community: '社区',
about: '关于',
logout: '登出',
},
Expand Down

0 comments on commit bdf56c7

Please sign in to comment.