From 80ddb00f107c01babea0c73c0d38eec2c8b79677 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Mon, 27 Nov 2023 15:38:05 +0800 Subject: [PATCH] fix: score_threshold_enabled variable (#1627) --- .../datasets/common/retrieval-param-config/index.tsx | 4 ++-- web/app/components/datasets/create/step-two/index.tsx | 2 +- web/app/components/explore/sidebar/index.tsx | 4 ++-- web/types/app.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/app/components/datasets/common/retrieval-param-config/index.tsx b/web/app/components/datasets/common/retrieval-param-config/index.tsx index e824dac767..7a4feac8ba 100644 --- a/web/app/components/datasets/common/retrieval-param-config/index.tsx +++ b/web/app/components/datasets/common/retrieval-param-config/index.tsx @@ -114,12 +114,12 @@ const RetrievalParamConfig: FC = ({ score_threshold: v, }) }} - enable={value.score_threshold_enable} + enable={value.score_threshold_enabled} hasSwitch={true} onSwitchChange={(_key, v) => { onChange({ ...value, - score_threshold_enable: v, + score_threshold_enabled: v, }) }} /> diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx index 308d0972bf..f9692bc8fa 100644 --- a/web/app/components/datasets/create/step-two/index.tsx +++ b/web/app/components/datasets/create/step-two/index.tsx @@ -493,7 +493,7 @@ const StepTwo = ({ reranking_model_name: rerankDefaultModel?.model_name, }, top_k: 3, - score_threshold_enable: false, + score_threshold_enabled: false, score_threshold: 0.5, } as RetrievalConfig) diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsx index 43afe07ec6..21817984c8 100644 --- a/web/app/components/explore/sidebar/index.tsx +++ b/web/app/components/explore/sidebar/index.tsx @@ -94,7 +94,7 @@ const SideBar: FC = ({
{isDiscoverySelected ? : } @@ -102,7 +102,7 @@ const SideBar: FC = ({ {isChatSelected ? : } diff --git a/web/types/app.ts b/web/types/app.ts index fea0d5933a..6b53e2b87e 100644 --- a/web/types/app.ts +++ b/web/types/app.ts @@ -332,6 +332,6 @@ export type RetrievalConfig = { reranking_model_name: string } top_k: number - score_threshold_enable: boolean + score_threshold_enabled: boolean score_threshold: number }