mirror of
https://github.com/Tencent/WeKnora.git
synced 2026-08-30 16:53:21 +08:00
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;
|
||||
}
|
||||
|
||||
// 校验 ReRank 模型(当需要时必填)
|
||||
if (needsRerankModel.value && !formData.value.config.rerank_model_id) {
|
||||
MessagePlugin.error(t('agent.editor.rerankModelRequired'));
|
||||
currentSection.value = 'knowledge';
|
||||
return;
|
||||
}
|
||||
// ReRank 模型(可选)
|
||||
// 运行时若 rerank_model_id 为空会自动跳过 rerank,无需在保存时强制要求。
|
||||
// 仅当用户已选择 rerank 模型时,才校验相关参数。
|
||||
|
||||
// 过滤空推荐问题
|
||||
if (formData.value.config.suggested_prompts) {
|
||||
|
||||
Reference in New Issue
Block a user