Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix: score_threshold_enabled variable (#1627)

zxhlyh80ddb00f107c
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 e824dac7674..7a4feac8ba8 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<Props> = ({
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 308d0972bf7..f9692bc8fae 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 43afe07ec68..21817984c8d 100644
--- a/web/app/components/explore/sidebar/index.tsx
+++ b/web/app/components/explore/sidebar/index.tsx
@@ -94,7 +94,7 @@ const SideBar: FC<IExploreSideBarProps> = ({
<div>
<Link
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)' } : {}}
>
{isDiscoverySelected ? <SelectedDiscoveryIcon /> : <DiscoveryIcon />}
@@ -102,7 +102,7 @@ const SideBar: FC<IExploreSideBarProps> = ({
</Link>
<Link
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)' } : {}}
>
{isChatSelected ? <SelectedChatIcon /> : <ChatIcon />}
diff --git a/web/types/app.ts b/web/types/app.ts
index fea0d5933a0..6b53e2b87e3 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
}