fix: Fix retrieval configuration handling in dataset components (#26361)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Wu Tianwei
2025-09-29 14:58:28 +08:00
committed by GitHub
parent af662b100b
commit 1a7898dff1
10 changed files with 216 additions and 134 deletions

View File

@@ -54,7 +54,7 @@ const RetrievalParamConfig: FC<Props> = ({
},
)
const handleDisabledSwitchClick = useCallback((enable: boolean) => {
const handleToggleRerankEnable = useCallback((enable: boolean) => {
if (enable && !currentModel)
Toast.notify({ type: 'error', message: t('workflow.errorMsg.rerankModelRequired') })
onChange({
@@ -119,7 +119,7 @@ const RetrievalParamConfig: FC<Props> = ({
<Switch
size='md'
defaultValue={value.reranking_enable}
onChange={handleDisabledSwitchClick}
onChange={handleToggleRerankEnable}
/>
)}
<div className='flex items-center'>