Skip to content

Commit

Permalink
fix: empty knowledge add file (langgenius#7690)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored and cuiks committed Sep 2, 2024
1 parent 4231f78 commit b9492fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
40 changes: 13 additions & 27 deletions web/app/components/datasets/create/step-two/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion web/i18n/zh-Hans/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 扩展',
Expand Down
2 changes: 1 addition & 1 deletion web/i18n/zh-Hant/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 擴充套件',
Expand Down

0 comments on commit b9492fc

Please sign in to comment.