mirror of
https://github.com/langgenius/dify.git
synced 2026-06-03 08:16:37 +08:00
fix: External retrieval model response rejects empty score threshold bug (#36577)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -504,7 +504,7 @@ export type DatasetExternalKnowledgeInfoResponse = {
|
||||
}
|
||||
|
||||
export type DatasetExternalRetrievalModelResponse = {
|
||||
score_threshold: number
|
||||
score_threshold?: number | null
|
||||
score_threshold_enabled?: boolean | null
|
||||
top_k: number
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ export const zDatasetExternalKnowledgeInfoResponse = z.object({
|
||||
* DatasetExternalRetrievalModelResponse
|
||||
*/
|
||||
export const zDatasetExternalRetrievalModelResponse = z.object({
|
||||
score_threshold: z.number(),
|
||||
score_threshold: z.number().nullish(),
|
||||
score_threshold_enabled: z.boolean().nullish(),
|
||||
top_k: z.int(),
|
||||
})
|
||||
|
||||
@@ -258,7 +258,7 @@ export type DatasetExternalKnowledgeInfoResponse = {
|
||||
}
|
||||
|
||||
export type DatasetExternalRetrievalModelResponse = {
|
||||
score_threshold: number
|
||||
score_threshold?: number | null
|
||||
score_threshold_enabled?: boolean | null
|
||||
top_k: number
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ export const zDatasetExternalKnowledgeInfoResponse = z.object({
|
||||
* DatasetExternalRetrievalModelResponse
|
||||
*/
|
||||
export const zDatasetExternalRetrievalModelResponse = z.object({
|
||||
score_threshold: z.number(),
|
||||
score_threshold: z.number().nullish(),
|
||||
score_threshold_enabled: z.boolean().nullish(),
|
||||
top_k: z.int(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user