mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
fix: remove Top K in retrieval testing #770 and if the document parsing fails, the error message returned by the backend is displayed (#782)
### What problem does this PR solve? fix: remove Top K in retrieval testing #770 fix: if the document parsing fails, the error message returned by the backend is displayed. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import SimilaritySlider from '@/components/similarity-slider';
|
||||
import { Button, Card, Divider, Flex, Form, Input, Slider } from 'antd';
|
||||
import { Button, Card, Divider, Flex, Form, Input } from 'antd';
|
||||
import { FormInstance } from 'antd/lib';
|
||||
|
||||
import { useTranslate } from '@/hooks/commonHooks';
|
||||
@ -9,7 +9,6 @@ import styles from './index.less';
|
||||
type FieldType = {
|
||||
similarity_threshold?: number;
|
||||
vector_similarity_weight?: number;
|
||||
top_k?: number;
|
||||
question: string;
|
||||
};
|
||||
|
||||
@ -36,22 +35,8 @@ const TestingControl = ({ form, handleTesting }: IProps) => {
|
||||
<p>{t('testingDescription')}</p>
|
||||
<Divider></Divider>
|
||||
<section>
|
||||
<Form
|
||||
name="testing"
|
||||
layout="vertical"
|
||||
form={form}
|
||||
initialValues={{
|
||||
top_k: 1024,
|
||||
}}
|
||||
>
|
||||
<Form name="testing" layout="vertical" form={form}>
|
||||
<SimilaritySlider isTooltipShown></SimilaritySlider>
|
||||
<Form.Item<FieldType>
|
||||
label="Top K"
|
||||
name={'top_k'}
|
||||
tooltip={t('topKTip')}
|
||||
>
|
||||
<Slider marks={{ 0: 0, 2048: 2048 }} max={2048} />
|
||||
</Form.Item>
|
||||
<Card size="small" title={t('testText')}>
|
||||
<Form.Item<FieldType>
|
||||
name={'question'}
|
||||
|
||||
Reference in New Issue
Block a user