fix(web): knowledge config
This commit is contained in:
@@ -1281,13 +1281,13 @@ export const en = {
|
||||
hybrid: 'Hybrid Retrieval',
|
||||
graph: 'Graph Retrieval',
|
||||
|
||||
similarity_threshold: 'Semantic similarity threshold',
|
||||
similarity_threshold_desc: 'Only return results with semantic similarity higher than this threshold',
|
||||
similarity_threshold_desc1: 'The minimum similarity threshold for semantic retrieval',
|
||||
vector_similarity_weight: 'Semantic similarity threshold',
|
||||
vector_similarity_weight_desc: 'Only return results with semantic similarity higher than this threshold',
|
||||
vector_similarity_weight_desc1: 'The minimum similarity threshold for semantic retrieval',
|
||||
|
||||
vector_similarity_weight: 'Vector Similarity Weight',
|
||||
vector_similarity_weight_desc: 'Only return results with BM25 scores above this threshold',
|
||||
vector_similarity_weight_desc1: 'The minimum BM25 score threshold for word segmentation retrieval',
|
||||
similarity_threshold: 'Vector Similarity Weight',
|
||||
similarity_threshold_desc: 'Only return results with BM25 scores above this threshold',
|
||||
similarity_threshold_desc1: 'The minimum BM25 score threshold for word segmentation retrieval',
|
||||
|
||||
description: 'Description',
|
||||
shareVersion: 'Share Version',
|
||||
|
||||
@@ -663,13 +663,13 @@ export const zh = {
|
||||
hybrid: '混合检索',
|
||||
graph: '图谱检索',
|
||||
|
||||
similarity_threshold: '语义相似度阈值',
|
||||
similarity_threshold_desc: '仅返回语义相似度高于此阈值的结果',
|
||||
similarity_threshold_desc1: '语义检索的最小相似度阈值',
|
||||
similarity_threshold: '向量相似度权重',
|
||||
similarity_threshold_desc: '仅返回BM25分数高于此阈值的结果',
|
||||
similarity_threshold_desc1: '分词检索的最小BM25分数阈值',
|
||||
|
||||
vector_similarity_weight: '向量相似度权重',
|
||||
vector_similarity_weight_desc: '仅返回BM25分数高于此阈值的结果',
|
||||
vector_similarity_weight_desc1: '分词检索的最小BM25分数阈值',
|
||||
vector_similarity_weight: '语义相似度阈值',
|
||||
vector_similarity_weight_desc: '仅返回语义相似度高于此阈值的结果',
|
||||
vector_similarity_weight_desc1: '语义检索的最小相似度阈值',
|
||||
|
||||
description: '描述',
|
||||
shareVersion: '分享版本',
|
||||
|
||||
@@ -150,23 +150,8 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
onChange={(value) => form.setFieldValue('top_k', value)}
|
||||
/>
|
||||
</FormItem>
|
||||
{/* Semantic similarity threshold */}
|
||||
{/* Vector similarity weight */}
|
||||
{values?.retrieve_type === 'semantic' && (
|
||||
<FormItem
|
||||
name="similarity_threshold"
|
||||
label={t('application.similarity_threshold')}
|
||||
extra={t('application.similarity_threshold_desc')}
|
||||
initialValue={0.5}
|
||||
>
|
||||
<RbSlider
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
{/* Word segmentation matching threshold */}
|
||||
{values?.retrieve_type === 'participle' && (
|
||||
<FormItem
|
||||
name="vector_similarity_weight"
|
||||
label={t('application.vector_similarity_weight')}
|
||||
@@ -177,6 +162,23 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
isInput={true}
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
{/* Semantic similarity threshold */}
|
||||
{values?.retrieve_type === 'participle' && (
|
||||
<FormItem
|
||||
name="similarity_threshold"
|
||||
label={t('application.similarity_threshold')}
|
||||
extra={t('application.similarity_threshold_desc')}
|
||||
initialValue={0.5}
|
||||
>
|
||||
<RbSlider
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
isInput={true}
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
@@ -193,6 +195,7 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
isInput={true}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem
|
||||
@@ -205,6 +208,7 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
isInput={true}
|
||||
/>
|
||||
</FormItem>
|
||||
</>
|
||||
|
||||
@@ -110,7 +110,6 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
label: t(`application.${key}`),
|
||||
value: key,
|
||||
}))}
|
||||
// onChange={handleChange}
|
||||
/>
|
||||
</FormItem>
|
||||
{/* Top K */}
|
||||
@@ -124,27 +123,11 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
style={{ width: '100%' }}
|
||||
min={1}
|
||||
max={20}
|
||||
// onChange={(value) => form.setFieldValue('top_k', value)}
|
||||
onChange={(value) => form.setFieldValue('top_k', value)}
|
||||
/>
|
||||
</FormItem>
|
||||
{/* 语义相似度阈值 similarity_threshold */}
|
||||
{/* Vector similarity weight */}
|
||||
{values?.retrieve_type === 'semantic' && (
|
||||
<FormItem
|
||||
name="similarity_threshold"
|
||||
label={t('application.similarity_threshold')}
|
||||
extra={t('application.similarity_threshold_desc')}
|
||||
initialValue={0.5}
|
||||
>
|
||||
<RbSlider
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
isInput={true}
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
{/* 分词匹配度阈值 vector_similarity_weight */}
|
||||
{values?.retrieve_type === 'participle' && (
|
||||
<FormItem
|
||||
name="vector_similarity_weight"
|
||||
label={t('application.vector_similarity_weight')}
|
||||
@@ -159,7 +142,23 @@ const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfig
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
{/* 混合检索权重 */}
|
||||
{/* similarity threshold */}
|
||||
{values?.retrieve_type === 'participle' && (
|
||||
<FormItem
|
||||
name="similarity_threshold"
|
||||
label={t('application.similarity_threshold')}
|
||||
extra={t('application.similarity_threshold_desc')}
|
||||
initialValue={0.5}
|
||||
>
|
||||
<RbSlider
|
||||
max={1.0}
|
||||
step={0.1}
|
||||
min={0.0}
|
||||
isInput={true}
|
||||
/>
|
||||
</FormItem>
|
||||
)}
|
||||
{/* Hybrid retrieval weight */}
|
||||
{values?.retrieve_type === 'hybrid' && (
|
||||
<>
|
||||
<FormItem
|
||||
|
||||
Reference in New Issue
Block a user