Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
Fix: chatbot retrieval setting save issue (#9536)
Yi Xiaobddcb31fe234
diff --git a/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx b/web/app/components/app/configuration/dataset-config/params-config/config-content.tsxindex 04ae1466450..0068a7abbf8 100644--- a/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx+++ b/web/app/components/app/configuration/dataset-config/params-config/config-content.tsx@@ -60,6 +60,7 @@ const ConfigContent: FC<Props> = ({const {modelList: rerankModelList,defaultModel: rerankDefaultModel,+ currentModel: isRerankDefaultModelValid,} = useModelListAndDefaultModelAndCurrentProviderAndModel(ModelTypeEnum.rerank)const {@@ -160,14 +161,14 @@ const ConfigContent: FC<Props> = ({const selectedRerankMode = datasetConfigs.reranking_mode || RerankingModeEnum.RerankingModelconst canManuallyToggleRerank = useMemo(() => {- return !(- (selectedDatasetsMode.allInternal && selectedDatasetsMode.allEconomic)+ return (selectedDatasetsMode.allInternal && selectedDatasetsMode.allEconomic)|| selectedDatasetsMode.allExternal- )}, [selectedDatasetsMode.allEconomic, selectedDatasetsMode.allExternal, selectedDatasetsMode.allInternal])const showRerankModel = useMemo(() => {if (!canManuallyToggleRerank)+ return true+ else if (canManuallyToggleRerank && !isRerankDefaultModelValid)return falsereturn datasetConfigs.reranking_enable@@ -179,7 +180,7 @@ const ConfigContent: FC<Props> = ({}, [currentRerankModel, showRerankModel, t])useEffect(() => {- if (!canManuallyToggleRerank && showRerankModel !== datasetConfigs.reranking_enable) {+ if (canManuallyToggleRerank && showRerankModel !== datasetConfigs.reranking_enable) {onChange({...datasetConfigs,reranking_enable: showRerankModel,diff --git a/web/app/components/app/configuration/dataset-config/params-config/index.tsx b/web/app/components/app/configuration/dataset-config/params-config/index.tsxindex 91d0e4e590f..c8c8acccd36 100644--- a/web/app/components/app/configuration/dataset-config/params-config/index.tsx+++ b/web/app/components/app/configuration/dataset-config/params-config/index.tsx@@ -42,23 +42,30 @@ const ParamsConfig = ({allHighQuality,allHighQualityFullTextSearch,allHighQualityVectorSearch,- allInternal,allExternal,mixtureHighQualityAndEconomic,inconsistentEmbeddingModel,mixtureInternalAndExternal,} = getSelectedDatasetsMode(selectedDatasets)- const { datasets, retrieval_model, score_threshold_enabled, ...restConfigs } = datasetConfigs- let rerankEnable = restConfigs.reranking_enable-- if (((allInternal && allEconomic) || allExternal) && !restConfigs.reranking_model?.reranking_provider_name && rerankEnable === undefined)- rerankEnable = falseif (allEconomic || allHighQuality || allHighQualityFullTextSearch || allHighQualityVectorSearch || (allExternal && selectedDatasets.length === 1))setRerankSettingModalOpen(false)if (mixtureHighQualityAndEconomic || inconsistentEmbeddingModel || mixtureInternalAndExternal || (allExternal && selectedDatasets.length > 1))setRerankSettingModalOpen(true)+ }, [selectedDatasets])++ useEffect(() => {+ const {+ allEconomic,+ allInternal,+ allExternal,+ } = getSelectedDatasetsMode(selectedDatasets)+ const { datasets, retrieval_model, score_threshold_enabled, ...restConfigs } = datasetConfigs+ let rerankEnable = restConfigs.reranking_enable++ if (((allInternal && allEconomic) || allExternal) && !restConfigs.reranking_model?.reranking_provider_name && rerankEnable === undefined)+ rerankEnable = falsesetTempDataSetConfigs({...getMultipleRetrievalConfig({@@ -90,7 +97,7 @@ const ParamsConfig = ({const isValid = () => {let errMsg = ''if (tempDataSetConfigs.retrieval_model === RETRIEVE_TYPE.multiWay) {- if (!tempDataSetConfigs.reranking_model?.reranking_model_name && (!rerankDefaultModel && isRerankDefaultModelValid))+ if (!tempDataSetConfigs.reranking_model?.reranking_model_name && (rerankDefaultModel && !isRerankDefaultModelValid))errMsg = t('appDebug.datasetConfig.rerankModelRequired')}if (errMsg) {@@ -104,7 +111,6 @@ const ParamsConfig = ({const handleSave = () => {if (!isValid())return-const config = { ...tempDataSetConfigs }if (config.retrieval_model === RETRIEVE_TYPE.multiWay && !config.reranking_model) {config.reranking_model = {