Enhance knowledge base configuration by normalizing and validating custom instruction fields. Implemented length checks for prompt instructions and added tests for validation logic. Updated GraphSettings to retain custom instructions when extraction is disabled.
This commit is contained in:
@@ -103,6 +103,10 @@ func ValidateProcessOverrides(
|
||||
return werrors.NewBadRequestError("上传音频文件需要设置ASR语音识别模型")
|
||||
}
|
||||
|
||||
if err := types.ValidateEffectiveProcessPromptInstructions(eff); err != nil {
|
||||
return werrors.NewBadRequestError(err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user