mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
'use client'
|
||||
import type { FC } from 'react'
|
||||
import type { RetrievalConfig } from '@/types/app'
|
||||
import Image from 'next/image'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Image from 'next/image'
|
||||
import { retrievalIcon } from '../../create/icons'
|
||||
import type { RetrievalConfig } from '@/types/app'
|
||||
import { RETRIEVE_METHOD } from '@/types/app'
|
||||
import RadioCard from '@/app/components/base/radio-card'
|
||||
import { RETRIEVE_METHOD } from '@/types/app'
|
||||
import { retrievalIcon } from '../../create/icons'
|
||||
|
||||
type Props = {
|
||||
value: RetrievalConfig
|
||||
@ -28,35 +28,35 @@ const EconomicalRetrievalMethodConfig: FC<Props> = ({
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const type = value.search_method
|
||||
const icon = <Image className='size-3.5 text-util-colors-purple-purple-600' src={getIcon(type)} alt='' />
|
||||
const icon = <Image className="size-3.5 text-util-colors-purple-purple-600" src={getIcon(type)} alt="" />
|
||||
return (
|
||||
<div className='space-y-2'>
|
||||
<div className="space-y-2">
|
||||
<RadioCard
|
||||
icon={icon}
|
||||
title={t(`dataset.retrieval.${type}.title`)}
|
||||
description={t(`dataset.retrieval.${type}.description`)}
|
||||
noRadio
|
||||
chosenConfigWrapClassName='!pb-3'
|
||||
chosenConfig={
|
||||
<div className='flex flex-wrap text-xs font-normal leading-[18px]'>
|
||||
chosenConfigWrapClassName="!pb-3"
|
||||
chosenConfig={(
|
||||
<div className="flex flex-wrap text-xs font-normal leading-[18px]">
|
||||
{value.reranking_model.reranking_model_name && (
|
||||
<div className='mr-8 flex space-x-1'>
|
||||
<div className='text-gray-500'>{t('common.modelProvider.rerankModel.key')}</div>
|
||||
<div className='font-medium text-gray-800'>{value.reranking_model.reranking_model_name}</div>
|
||||
<div className="mr-8 flex space-x-1">
|
||||
<div className="text-gray-500">{t('common.modelProvider.rerankModel.key')}</div>
|
||||
<div className="font-medium text-gray-800">{value.reranking_model.reranking_model_name}</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className='mr-8 flex space-x-1'>
|
||||
<div className='text-gray-500'>{t('appDebug.datasetConfig.top_k')}</div>
|
||||
<div className='font-medium text-gray-800'>{value.top_k}</div>
|
||||
<div className="mr-8 flex space-x-1">
|
||||
<div className="text-gray-500">{t('appDebug.datasetConfig.top_k')}</div>
|
||||
<div className="font-medium text-gray-800">{value.top_k}</div>
|
||||
</div>
|
||||
|
||||
<div className='mr-8 flex space-x-1'>
|
||||
<div className='text-gray-500'>{t('appDebug.datasetConfig.score_threshold')}</div>
|
||||
<div className='font-medium text-gray-800'>{value.score_threshold}</div>
|
||||
<div className="mr-8 flex space-x-1">
|
||||
<div className="text-gray-500">{t('appDebug.datasetConfig.score_threshold')}</div>
|
||||
<div className="font-medium text-gray-800">{value.score_threshold}</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user