mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:32:01 +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:
parent
639e12a306
commit
67d99723ea
@ -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
|
||||
|
||||
|
||||
|
||||
@ -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 |
|
||||
|
||||
|
||||
@ -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 |
|
||||
|
||||
|
||||
@ -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(),
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user