mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Vector similarity weight is displayed incorrectly #965 feat: add rerank models to the project #724 #162 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -2,8 +2,11 @@ import SimilaritySlider from '@/components/similarity-slider';
|
||||
import { Button, Card, Divider, Flex, Form, Input } from 'antd';
|
||||
import { FormInstance } from 'antd/lib';
|
||||
|
||||
import Rerank from '@/components/rerank';
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
import { useFetchLlmList } from '@/hooks/llmHooks';
|
||||
import { useOneNamespaceEffectsLoading } from '@/hooks/storeHooks';
|
||||
import { useEffect } from 'react';
|
||||
import styles from './index.less';
|
||||
|
||||
type FieldType = {
|
||||
@ -23,6 +26,11 @@ const TestingControl = ({ form, handleTesting }: IProps) => {
|
||||
'testDocumentChunk',
|
||||
]);
|
||||
const { t } = useTranslate('knowledgeDetails');
|
||||
const fetchLlmList = useFetchLlmList();
|
||||
|
||||
useEffect(() => {
|
||||
fetchLlmList();
|
||||
}, [fetchLlmList]);
|
||||
|
||||
const buttonDisabled =
|
||||
!question || (typeof question === 'string' && question.trim() === '');
|
||||
@ -37,6 +45,7 @@ const TestingControl = ({ form, handleTesting }: IProps) => {
|
||||
<section>
|
||||
<Form name="testing" layout="vertical" form={form}>
|
||||
<SimilaritySlider isTooltipShown></SimilaritySlider>
|
||||
<Rerank></Rerank>
|
||||
<Card size="small" title={t('testText')}>
|
||||
<Form.Item<FieldType>
|
||||
name={'question'}
|
||||
|
||||
Reference in New Issue
Block a user