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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7 additions and 7 deletions

View File

@ -200,7 +200,7 @@ class DatasetExternalKnowledgeInfoResponse(ResponseModel):
class DatasetExternalRetrievalModelResponse(ResponseModel):
top_k: int
score_threshold: float
score_threshold: float | None = None
score_threshold_enabled: bool | None = None

View File

@ -11799,7 +11799,7 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| score_threshold | number | | Yes |
| score_threshold | number | | No |
| score_threshold_enabled | boolean | | No |
| top_k | integer | | Yes |

View File

@ -2421,7 +2421,7 @@ Condition detail
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| score_threshold | number | | Yes |
| score_threshold | number | | No |
| score_threshold_enabled | boolean | | No |
| top_k | integer | | Yes |

View File

@ -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
}

View File

@ -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(),
})

View File

@ -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
}

View File

@ -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(),
})