fix(frontend): make rerank model optional in agent editor save
The runtime chat pipeline (internal/application/service/chat_pipeline/rerank.go:56) already skips rerank when rerank_model_id is empty, so it should not be required at save time. The editor incorrectly required rerank_model_id whenever a RAG KB was selected, even though the field is optional. This fix removes the validation so users can save agents without configuring a rerank model. Fixes #1252
This commit is contained in:
@@ -3583,12 +3583,9 @@ const handleSave = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 校验 ReRank 模型(当需要时必填)
|
// ReRank 模型(可选)
|
||||||
if (needsRerankModel.value && !formData.value.config.rerank_model_id) {
|
// 运行时若 rerank_model_id 为空会自动跳过 rerank,无需在保存时强制要求。
|
||||||
MessagePlugin.error(t('agent.editor.rerankModelRequired'));
|
// 仅当用户已选择 rerank 模型时,才校验相关参数。
|
||||||
currentSection.value = 'knowledge';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 过滤空推荐问题
|
// 过滤空推荐问题
|
||||||
if (formData.value.config.suggested_prompts) {
|
if (formData.value.config.suggested_prompts) {
|
||||||
|
|||||||
Reference in New Issue
Block a user