mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 20:15:52 +08:00
fix: score_threshold_enabled variable (#1627)
This commit is contained in:
parent
74b2260ba6
commit
80ddb00f10
@ -114,12 +114,12 @@ const RetrievalParamConfig: FC<Props> = ({
|
|||||||
score_threshold: v,
|
score_threshold: v,
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
enable={value.score_threshold_enable}
|
enable={value.score_threshold_enabled}
|
||||||
hasSwitch={true}
|
hasSwitch={true}
|
||||||
onSwitchChange={(_key, v) => {
|
onSwitchChange={(_key, v) => {
|
||||||
onChange({
|
onChange({
|
||||||
...value,
|
...value,
|
||||||
score_threshold_enable: v,
|
score_threshold_enabled: v,
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -493,7 +493,7 @@ const StepTwo = ({
|
|||||||
reranking_model_name: rerankDefaultModel?.model_name,
|
reranking_model_name: rerankDefaultModel?.model_name,
|
||||||
},
|
},
|
||||||
top_k: 3,
|
top_k: 3,
|
||||||
score_threshold_enable: false,
|
score_threshold_enabled: false,
|
||||||
score_threshold: 0.5,
|
score_threshold: 0.5,
|
||||||
} as RetrievalConfig)
|
} as RetrievalConfig)
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ const SideBar: FC<IExploreSideBarProps> = ({
|
|||||||
<div>
|
<div>
|
||||||
<Link
|
<Link
|
||||||
href='/explore/apps'
|
href='/explore/apps'
|
||||||
className={cn(isDiscoverySelected ? 'text-primary-600 bg-white font-semibold' : 'text-gray-700 font-medium', 'flex items-center mobile:justify-center mobile:w-fit h-9 px-3 mobile:px-2 gap-2 rounded-lg')}
|
className={cn(isDiscoverySelected ? 'text-primary-600 bg-white font-semibold' : 'text-gray-700 font-medium hover:bg-gray-200', 'flex items-center pc:justify-start pc:w-full mobile:justify-center mobile:w-fit h-9 px-3 mobile:px-2 gap-2 rounded-lg')}
|
||||||
style={isDiscoverySelected ? { boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)' } : {}}
|
style={isDiscoverySelected ? { boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)' } : {}}
|
||||||
>
|
>
|
||||||
{isDiscoverySelected ? <SelectedDiscoveryIcon /> : <DiscoveryIcon />}
|
{isDiscoverySelected ? <SelectedDiscoveryIcon /> : <DiscoveryIcon />}
|
||||||
@ -102,7 +102,7 @@ const SideBar: FC<IExploreSideBarProps> = ({
|
|||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href='/explore/chat'
|
href='/explore/chat'
|
||||||
className={cn(isChatSelected ? 'text-primary-600 bg-white font-semibold' : 'text-gray-700 font-medium', 'flex items-center mobile:justify-center mobile:w-fit h-9 px-3 mobile:px-2 gap-2 rounded-lg')}
|
className={cn(isChatSelected ? 'text-primary-600 bg-white font-semibold' : 'text-gray-700 font-medium hover:bg-gray-200', 'flex items-center pc:justify-start pc:w-full mobile:justify-center mobile:w-fit h-9 px-3 mobile:px-2 gap-2 rounded-lg')}
|
||||||
style={isChatSelected ? { boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)' } : {}}
|
style={isChatSelected ? { boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)' } : {}}
|
||||||
>
|
>
|
||||||
{isChatSelected ? <SelectedChatIcon /> : <ChatIcon />}
|
{isChatSelected ? <SelectedChatIcon /> : <ChatIcon />}
|
||||||
|
@ -332,6 +332,6 @@ export type RetrievalConfig = {
|
|||||||
reranking_model_name: string
|
reranking_model_name: string
|
||||||
}
|
}
|
||||||
top_k: number
|
top_k: number
|
||||||
score_threshold_enable: boolean
|
score_threshold_enabled: boolean
|
||||||
score_threshold: number
|
score_threshold: number
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user