mirror of
https://github.com/langgenius/dify.git
synced 2025-12-14 20:01:13 +00:00
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: jyong <718720800@qq.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com> Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com> Co-authored-by: quicksand <quicksandzn@gmail.com> Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com> Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: Hanqing Zhao <sherry9277@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Harry <xh001x@hotmail.com>
62 lines
2.3 KiB
TypeScript
62 lines
2.3 KiB
TypeScript
'use client'
|
|
import React from 'react'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { RiBookOpenLine } from '@remixicon/react'
|
|
import { useDocLink } from '@/context/i18n'
|
|
import EmbeddingProcess from './embedding-process'
|
|
import type { InitialDocumentDetail } from '@/models/pipeline'
|
|
import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
|
|
|
|
type ProcessingProps = {
|
|
batchId: string
|
|
documents: InitialDocumentDetail[]
|
|
}
|
|
|
|
const Processing = ({
|
|
batchId,
|
|
documents,
|
|
}: ProcessingProps) => {
|
|
const { t } = useTranslation()
|
|
const docLink = useDocLink()
|
|
const datasetId = useDatasetDetailContextWithSelector(s => s.dataset?.id)
|
|
const indexingType = useDatasetDetailContextWithSelector(s => s.dataset?.indexing_technique)
|
|
const retrievalMethod = useDatasetDetailContextWithSelector(s => s.dataset?.retrieval_model_dict.search_method)
|
|
|
|
return (
|
|
<div className='flex h-full w-full justify-center overflow-hidden'>
|
|
<div className='h-full w-3/5 overflow-y-auto pb-8 pt-10'>
|
|
<div className='max-w-[640px]'>
|
|
<EmbeddingProcess
|
|
datasetId={datasetId!}
|
|
batchId={batchId}
|
|
documents={documents}
|
|
indexingType={indexingType}
|
|
retrievalMethod={retrievalMethod}
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div className='w-2/5 pr-8 pt-[88px]'>
|
|
<div className='flex w-[328px] flex-col gap-3 rounded-xl bg-background-section p-6'>
|
|
<div className='flex size-10 items-center justify-center rounded-[10px] bg-components-card-bg shadow-lg shadow-shadow-shadow-5'>
|
|
<RiBookOpenLine className='size-5 text-text-accent' />
|
|
</div>
|
|
<div className='flex flex-col gap-y-2'>
|
|
<div className='system-xl-semibold text-text-secondary'>{t('datasetCreation.stepThree.sideTipTitle')}</div>
|
|
<div className='system-sm-regular text-text-tertiary'>{t('datasetCreation.stepThree.sideTipContent')}</div>
|
|
<a
|
|
href={docLink('/guides/knowledge-base/integrate-knowledge-within-application')}
|
|
target='_blank'
|
|
rel='noreferrer noopener'
|
|
className='system-sm-regular text-text-accent'
|
|
>
|
|
{t('datasetPipeline.addDocuments.stepThree.learnMore')}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Processing
|