Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: empty knowledge add file (#7690)

zxhlyh88730906ec20
diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx
index 1b562411918..890ceea630e 100644
--- a/web/app/components/datasets/create/step-two/index.tsx
+++ b/web/app/components/datasets/create/step-two/index.tsx
@@ -10,7 +10,6 @@ import {
} from '@remixicon/react'
import Link from 'next/link'
import { groupBy } from 'lodash-es'
-import RetrievalMethodInfo from '../../common/retrieval-method-info'
import PreviewItem, { PreviewType } from './preview-item'
import LanguageSelect from './language-select'
import s from './index.module.css'
@@ -785,34 +784,21 @@ const StepTwo = ({
)}
<div className='max-w-[640px]'>
- {!datasetId
- ? (<>
- {getIndexing_technique() === IndexingType.QUALIFIED
- ? (
- <RetrievalMethodConfig
- value={retrievalConfig}
- onChange={setRetrievalConfig}
- />
- )
- : (
- <EconomicalRetrievalMethodConfig
- value={retrievalConfig}
- onChange={setRetrievalConfig}
- />
- )}
- </>)
- : (
- <div>
- <RetrievalMethodInfo
+ {
+ getIndexing_technique() === IndexingType.QUALIFIED
+ ? (
+ <RetrievalMethodConfig
value={retrievalConfig}
+ onChange={setRetrievalConfig}
/>
- <div className='mt-2 text-xs text-gray-500 font-medium'>
- {t('datasetCreation.stepTwo.retrivalSettedTip')}
- <Link className='text-[#155EEF]' href={`/datasets/${datasetId}/settings`}>{t('datasetCreation.stepTwo.datasetSettingLink')}</Link>
- </div>
- </div>
- )}
-
+ )
+ : (
+ <EconomicalRetrievalMethodConfig
+ value={retrievalConfig}
+ onChange={setRetrievalConfig}
+ />
+ )
+ }
</div>
</div>
diff --git a/web/i18n/zh-Hans/common.ts b/web/i18n/zh-Hans/common.ts
index 73cf435a7c7..5333d18763b 100644
--- a/web/i18n/zh-Hans/common.ts
+++ b/web/i18n/zh-Hans/common.ts
@@ -410,7 +410,7 @@ const translation = {
apiBasedExtension: {
title: 'API 扩展提供了一个集中式的 API 管理,在此统一添加 API 配置后,方便在 Dify 上的各类应用中直接使用。',
link: '了解如何开发您自己的 API 扩展。',
- linkUrl: 'https://docs.dify.ai/v/zh-hans/advanced/api_based_extension',
+ linkUrl: 'https://docs.dify.ai/v/zh-hans/guides/extension/api-based-extension',
add: '新增 API 扩展',
selector: {
title: 'API 扩展',
diff --git a/web/i18n/zh-Hant/common.ts b/web/i18n/zh-Hant/common.ts
index e14c3c3196c..02296907d95 100644
--- a/web/i18n/zh-Hant/common.ts
+++ b/web/i18n/zh-Hant/common.ts
@@ -380,7 +380,7 @@ const translation = {
apiBasedExtension: {
title: 'API 擴充套件提供了一個集中式的 API 管理,在此統一新增 API 配置後,方便在 Dify 上的各類應用中直接使用。',
link: '瞭解如何開發您自己的 API 擴充套件。',
- linkUrl: 'https://docs.dify.ai/v/zh-hans/advanced/api_based_extension',
+ linkUrl: 'https://docs.dify.ai/v/zh-hans/guides/extension/api-based-extension',
add: '新增 API 擴充套件',
selector: {
title: 'API 擴充套件',