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:
hsiong
2026-05-25 11:01:06 +08:00
committed by GitHub
parent 639e12a306
commit 67d99723ea
7 changed files with 7 additions and 7 deletions
@@ -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(),
})