feat(website-crawl): add jina reader as additional alternative for website crawling (#8761)

This commit is contained in:
Zhaofeng Miao
2024-09-30 09:57:19 +08:00
committed by GitHub
parent fb49413a41
commit 369e1e6f58
38 changed files with 927 additions and 75 deletions

View File

@@ -8,10 +8,12 @@ import ConfigItem from './config-item'
import s from './style.module.css'
import { DataSourceType } from './types'
import { DataSourceProvider } from '@/models/common'
import cn from '@/utils/classnames'
type Props = {
type: DataSourceType
provider: DataSourceProvider
isConfigured: boolean
onConfigure: () => void
readOnly: boolean
@@ -25,6 +27,7 @@ type Props = {
const Panel: FC<Props> = ({
type,
provider,
isConfigured,
onConfigure,
readOnly,
@@ -46,7 +49,7 @@ const Panel: FC<Props> = ({
<div className='text-sm font-medium text-gray-800'>{t(`common.dataSource.${type}.title`)}</div>
{isWebsite && (
<div className='ml-1 leading-[18px] px-1.5 rounded-md bg-white border border-gray-100 text-xs font-medium text-gray-700'>
<span className='text-gray-500'>{t('common.dataSource.website.with')}</span> 🔥 Firecrawl
<span className='text-gray-500'>{t('common.dataSource.website.with')}</span> { provider === DataSourceProvider.fireCrawl ? '🔥 Firecrawl' : 'Jina Reader'}
</div>
)}
</div>