您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. 'use client'
  2. import React from 'react'
  3. import { useTranslation } from 'react-i18next'
  4. import { RiBookOpenLine } from '@remixicon/react'
  5. import { useGetDocLanguage } from '@/context/i18n'
  6. import EmbeddingProcess from './embedding-process'
  7. import type { InitialDocumentDetail } from '@/models/pipeline'
  8. import { useDatasetDetailContextWithSelector } from '@/context/dataset-detail'
  9. type ProcessingProps = {
  10. batchId: string
  11. documents: InitialDocumentDetail[]
  12. }
  13. const Processing = ({
  14. batchId,
  15. documents,
  16. }: ProcessingProps) => {
  17. const { t } = useTranslation()
  18. const docLanguage = useGetDocLanguage()
  19. const datasetId = useDatasetDetailContextWithSelector(s => s.dataset?.id)
  20. const indexingType = useDatasetDetailContextWithSelector(s => s.dataset?.indexing_technique)
  21. const retrievalMethod = useDatasetDetailContextWithSelector(s => s.dataset?.retrieval_model_dict.search_method)
  22. return (
  23. <div className='flex h-full w-full justify-center overflow-hidden'>
  24. <div className='h-full w-3/5 overflow-y-auto pb-8 pt-10'>
  25. <div className='max-w-[640px]'>
  26. <EmbeddingProcess
  27. datasetId={datasetId!}
  28. batchId={batchId}
  29. documents={documents}
  30. indexingType={indexingType}
  31. retrievalMethod={retrievalMethod}
  32. />
  33. </div>
  34. </div>
  35. <div className='w-2/5 pr-8 pt-[88px]'>
  36. <div className='flex w-[328px] flex-col gap-3 rounded-xl bg-background-section p-6'>
  37. <div className='flex size-10 items-center justify-center rounded-[10px] bg-components-card-bg shadow-lg shadow-shadow-shadow-5'>
  38. <RiBookOpenLine className='size-5 text-text-accent' />
  39. </div>
  40. <div className='flex flex-col gap-y-2'>
  41. <div className='system-xl-semibold text-text-secondary'>{t('datasetCreation.stepThree.sideTipTitle')}</div>
  42. <div className='system-sm-regular text-text-tertiary'>{t('datasetCreation.stepThree.sideTipContent')}</div>
  43. <a
  44. href={`https://docs.dify.ai/${docLanguage}/guides/knowledge-base/integrate-knowledge-within-application`}
  45. target='_blank'
  46. rel='noreferrer noopener'
  47. className='system-sm-regular text-text-accent'
  48. >
  49. {t('datasetPipeline.addDocuments.stepThree.learnMore')}
  50. </a>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. )
  56. }
  57. export default Processing