fix: empty knowledge add file (#7690)

This commit is contained in:
zxhlyh 2024-08-27 11:25:27 +08:00 committed by GitHub
parent a15080a1d7
commit 88730906ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 29 deletions

View File

@ -10,7 +10,6 @@ import {
} from '@remixicon/react' } from '@remixicon/react'
import Link from 'next/link' import Link from 'next/link'
import { groupBy } from 'lodash-es' import { groupBy } from 'lodash-es'
import RetrievalMethodInfo from '../../common/retrieval-method-info'
import PreviewItem, { PreviewType } from './preview-item' import PreviewItem, { PreviewType } from './preview-item'
import LanguageSelect from './language-select' import LanguageSelect from './language-select'
import s from './index.module.css' import s from './index.module.css'
@ -785,34 +784,21 @@ const StepTwo = ({
)} )}
<div className='max-w-[640px]'> <div className='max-w-[640px]'>
{!datasetId {
? (<> getIndexing_technique() === IndexingType.QUALIFIED
{getIndexing_technique() === IndexingType.QUALIFIED ? (
? ( <RetrievalMethodConfig
<RetrievalMethodConfig
value={retrievalConfig}
onChange={setRetrievalConfig}
/>
)
: (
<EconomicalRetrievalMethodConfig
value={retrievalConfig}
onChange={setRetrievalConfig}
/>
)}
</>)
: (
<div>
<RetrievalMethodInfo
value={retrievalConfig} 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> <EconomicalRetrievalMethodConfig
</div> value={retrievalConfig}
</div> onChange={setRetrievalConfig}
)} />
)
}
</div> </div>
</div> </div>

View File

@ -410,7 +410,7 @@ const translation = {
apiBasedExtension: { apiBasedExtension: {
title: 'API 扩展提供了一个集中式的 API 管理,在此统一添加 API 配置后,方便在 Dify 上的各类应用中直接使用。', title: 'API 扩展提供了一个集中式的 API 管理,在此统一添加 API 配置后,方便在 Dify 上的各类应用中直接使用。',
link: '了解如何开发您自己的 API 扩展。', 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 扩展', add: '新增 API 扩展',
selector: { selector: {
title: 'API 扩展', title: 'API 扩展',

View File

@ -380,7 +380,7 @@ const translation = {
apiBasedExtension: { apiBasedExtension: {
title: 'API 擴充套件提供了一個集中式的 API 管理,在此統一新增 API 配置後,方便在 Dify 上的各類應用中直接使用。', title: 'API 擴充套件提供了一個集中式的 API 管理,在此統一新增 API 配置後,方便在 Dify 上的各類應用中直接使用。',
link: '瞭解如何開發您自己的 API 擴充套件。', 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 擴充套件', add: '新增 API 擴充套件',
selector: { selector: {
title: 'API 擴充套件', title: 'API 擴充套件',