mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 01:26:33 +08:00
fix: auto summary env (#31930)
This commit is contained in:
parent
74b027c41a
commit
cc5705cb71
@ -154,7 +154,7 @@ export const GeneralChunkingOptions: FC<GeneralChunkingOptionsProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
{
|
{
|
||||||
showSummaryIndexSetting && (
|
showSummaryIndexSetting && IS_CE_EDITION && (
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
<SummaryIndexSetting
|
<SummaryIndexSetting
|
||||||
entry="create-document"
|
entry="create-document"
|
||||||
|
|||||||
@ -12,6 +12,7 @@ import Divider from '@/app/components/base/divider'
|
|||||||
import { ParentChildChunk } from '@/app/components/base/icons/src/vender/knowledge'
|
import { ParentChildChunk } from '@/app/components/base/icons/src/vender/knowledge'
|
||||||
import RadioCard from '@/app/components/base/radio-card'
|
import RadioCard from '@/app/components/base/radio-card'
|
||||||
import SummaryIndexSetting from '@/app/components/datasets/settings/summary-index-setting'
|
import SummaryIndexSetting from '@/app/components/datasets/settings/summary-index-setting'
|
||||||
|
import { IS_CE_EDITION } from '@/config'
|
||||||
import { ChunkingMode } from '@/models/datasets'
|
import { ChunkingMode } from '@/models/datasets'
|
||||||
import FileList from '../../assets/file-list-3-fill.svg'
|
import FileList from '../../assets/file-list-3-fill.svg'
|
||||||
import Note from '../../assets/note-mod.svg'
|
import Note from '../../assets/note-mod.svg'
|
||||||
@ -191,7 +192,7 @@ export const ParentChildOptions: FC<ParentChildOptionsProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
{
|
{
|
||||||
showSummaryIndexSetting && (
|
showSummaryIndexSetting && IS_CE_EDITION && (
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
<SummaryIndexSetting
|
<SummaryIndexSetting
|
||||||
entry="create-document"
|
entry="create-document"
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import CustomPopover from '@/app/components/base/popover'
|
|||||||
import Switch from '@/app/components/base/switch'
|
import Switch from '@/app/components/base/switch'
|
||||||
import { ToastContext } from '@/app/components/base/toast'
|
import { ToastContext } from '@/app/components/base/toast'
|
||||||
import Tooltip from '@/app/components/base/tooltip'
|
import Tooltip from '@/app/components/base/tooltip'
|
||||||
|
import { IS_CE_EDITION } from '@/config'
|
||||||
import { DataSourceType, DocumentActionType } from '@/models/datasets'
|
import { DataSourceType, DocumentActionType } from '@/models/datasets'
|
||||||
import {
|
import {
|
||||||
useDocumentArchive,
|
useDocumentArchive,
|
||||||
@ -263,10 +264,14 @@ const Operations = ({
|
|||||||
<span className={s.actionName}>{t('list.action.sync', { ns: 'datasetDocuments' })}</span>
|
<span className={s.actionName}>{t('list.action.sync', { ns: 'datasetDocuments' })}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className={s.actionItem} onClick={() => onOperate('summary')}>
|
{
|
||||||
<SearchLinesSparkle className="h-4 w-4 text-text-tertiary" />
|
IS_CE_EDITION && (
|
||||||
<span className={s.actionName}>{t('list.action.summary', { ns: 'datasetDocuments' })}</span>
|
<div className={s.actionItem} onClick={() => onOperate('summary')}>
|
||||||
</div>
|
<SearchLinesSparkle className="h-4 w-4 text-text-tertiary" />
|
||||||
|
<span className={s.actionName}>{t('list.action.summary', { ns: 'datasetDocuments' })}</span>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
<Divider className="my-1" />
|
<Divider className="my-1" />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import Button from '@/app/components/base/button'
|
|||||||
import Confirm from '@/app/components/base/confirm'
|
import Confirm from '@/app/components/base/confirm'
|
||||||
import Divider from '@/app/components/base/divider'
|
import Divider from '@/app/components/base/divider'
|
||||||
import { SearchLinesSparkle } from '@/app/components/base/icons/src/vender/knowledge'
|
import { SearchLinesSparkle } from '@/app/components/base/icons/src/vender/knowledge'
|
||||||
|
import { IS_CE_EDITION } from '@/config'
|
||||||
import { cn } from '@/utils/classnames'
|
import { cn } from '@/utils/classnames'
|
||||||
|
|
||||||
const i18nPrefix = 'batchAction'
|
const i18nPrefix = 'batchAction'
|
||||||
@ -87,7 +88,7 @@ const BatchAction: FC<IBatchActionProps> = ({
|
|||||||
<span className="px-0.5">{t('metadata.metadata', { ns: 'dataset' })}</span>
|
<span className="px-0.5">{t('metadata.metadata', { ns: 'dataset' })}</span>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{onBatchSummary && (
|
{onBatchSummary && IS_CE_EDITION && (
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
className="gap-x-0.5 px-3"
|
className="gap-x-0.5 px-3"
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import RetrievalMethodConfig from '@/app/components/datasets/common/retrieval-me
|
|||||||
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
import { ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||||
import { useModelList } from '@/app/components/header/account-setting/model-provider-page/hooks'
|
import { useModelList } from '@/app/components/header/account-setting/model-provider-page/hooks'
|
||||||
import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector'
|
import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector'
|
||||||
|
import { IS_CE_EDITION } from '@/config'
|
||||||
import { useSelector as useAppContextWithSelector } from '@/context/app-context'
|
import { useSelector as useAppContextWithSelector } from '@/context/app-context'
|
||||||
import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
|
import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
|
||||||
import { useDocLink } from '@/context/i18n'
|
import { useDocLink } from '@/context/i18n'
|
||||||
@ -359,7 +360,7 @@ const Form = () => {
|
|||||||
{
|
{
|
||||||
indexMethod === IndexingType.QUALIFIED
|
indexMethod === IndexingType.QUALIFIED
|
||||||
&& [ChunkingMode.text, ChunkingMode.parentChild].includes(currentDataset?.doc_form as ChunkingMode)
|
&& [ChunkingMode.text, ChunkingMode.parentChild].includes(currentDataset?.doc_form as ChunkingMode)
|
||||||
&& (
|
&& IS_CE_EDITION && (
|
||||||
<>
|
<>
|
||||||
<Divider
|
<Divider
|
||||||
type="horizontal"
|
type="horizontal"
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import {
|
|||||||
Group,
|
Group,
|
||||||
} from '@/app/components/workflow/nodes/_base/components/layout'
|
} from '@/app/components/workflow/nodes/_base/components/layout'
|
||||||
import VarReferencePicker from '@/app/components/workflow/nodes/_base/components/variable/var-reference-picker'
|
import VarReferencePicker from '@/app/components/workflow/nodes/_base/components/variable/var-reference-picker'
|
||||||
|
import { IS_CE_EDITION } from '@/config'
|
||||||
import Split from '../_base/components/split'
|
import Split from '../_base/components/split'
|
||||||
import ChunkStructure from './components/chunk-structure'
|
import ChunkStructure from './components/chunk-structure'
|
||||||
import EmbeddingModel from './components/embedding-model'
|
import EmbeddingModel from './components/embedding-model'
|
||||||
@ -172,7 +173,7 @@ const Panel: FC<NodePanelProps<KnowledgeBaseNodeType>> = ({
|
|||||||
{
|
{
|
||||||
data.indexing_technique === IndexMethodEnum.QUALIFIED
|
data.indexing_technique === IndexMethodEnum.QUALIFIED
|
||||||
&& [ChunkStructureEnum.general, ChunkStructureEnum.parent_child].includes(data.chunk_structure)
|
&& [ChunkStructureEnum.general, ChunkStructureEnum.parent_child].includes(data.chunk_structure)
|
||||||
&& (
|
&& IS_CE_EDITION && (
|
||||||
<>
|
<>
|
||||||
<SummaryIndexSetting
|
<SummaryIndexSetting
|
||||||
summaryIndexSetting={data.summary_index_setting}
|
summaryIndexSetting={data.summary_index_setting}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user