Преглед на файлове

fix(RetrievalConfig): Fix score threshold assignment for zero value (#7865)

Hirotaka Miyagi преди 7 месеца
родител
ревизия
024d688b77
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsx

+ 1 - 1
web/app/components/workflow/nodes/knowledge-retrieval/components/retrieval-config.tsx

@@ -70,7 +70,7 @@ const RetrievalConfig: FC<Props> = ({
     }
     onMultipleRetrievalConfigChange({
       top_k: configs.top_k,
-      score_threshold: configs.score_threshold_enabled ? (configs.score_threshold || DATASET_DEFAULT.score_threshold) : null,
+      score_threshold: configs.score_threshold_enabled ? (configs.score_threshold ?? DATASET_DEFAULT.score_threshold) : null,
       reranking_model: payload.retrieval_mode === RETRIEVE_TYPE.oneWay
         ? undefined
         : (!configs.reranking_model?.reranking_provider_name