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:
wizardchen
2026-07-13 12:14:36 +08:00
committed by lyingbug
parent c1cddb4d4d
commit 5eefa70e6f
9 changed files with 158 additions and 35 deletions
@@ -103,6 +103,10 @@ func ValidateProcessOverrides(
return werrors.NewBadRequestError("上传音频文件需要设置ASR语音识别模型")
}
if err := types.ValidateEffectiveProcessPromptInstructions(eff); err != nil {
return werrors.NewBadRequestError(err.Error())
}
return nil
}