mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-26 08:56:47 +08:00
### What problem does this PR solve? Feat: Retrieval test #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { useTranslate } from '@/hooks/common-hooks';
|
||||
import { Form, Slider } from 'antd';
|
||||
import { useFormContext } from 'react-hook-form';
|
||||
import { z } from 'zod';
|
||||
import { SingleFormSlider } from '../ui/dual-range-slider';
|
||||
import {
|
||||
FormControl,
|
||||
@ -55,6 +56,19 @@ interface SimilaritySliderFormFieldProps {
|
||||
isTooltipShown?: boolean;
|
||||
}
|
||||
|
||||
export const initialSimilarityThresholdValue = {
|
||||
similarity_threshold: 0.2,
|
||||
};
|
||||
export const initialKeywordsSimilarityWeightValue = {
|
||||
keywords_similarity_weight: 0.7,
|
||||
};
|
||||
|
||||
export const similarityThresholdSchema = { similarity_threshold: z.number() };
|
||||
|
||||
export const keywordsSimilarityWeightSchema = {
|
||||
keywords_similarity_weight: z.number(),
|
||||
};
|
||||
|
||||
export function SimilaritySliderFormField({
|
||||
vectorSimilarityWeightName = 'vector_similarity_weight',
|
||||
isTooltipShown,
|
||||
|
||||
Reference in New Issue
Block a user