feat: 收敛知识库检索调度与评分语义

- 固定 rag.engine 与 Milvus 配置,补齐启动期检索基础设施校验

- 支持调用方配置 retrievalMode,并统一知识库检索入口与结果来源展示

- 修正关键词检索 knowledgeId 过滤、混合检索评分归一化与本地 ES 默认配置
This commit is contained in:
2026-04-05 20:23:05 +08:00
parent 2592a1f09d
commit b5dd427920
41 changed files with 1260 additions and 600 deletions

View File

@@ -24,6 +24,11 @@
});
const options = getOptions();
const retrievalModeOptions: SelectItem[] = [
{ value: 'HYBRID', label: '混合检索' },
{ value: 'VECTOR', label: '向量检索' },
{ value: 'KEYWORD', label: '关键词检索' }
];
let knowledgeArray = $state<SelectItem[]>([]);
onMount(async () => {
@@ -78,6 +83,16 @@
}
});
$effect(() => {
if (!data.retrievalMode) {
updateNodeData(currentNodeId, () => {
return {
retrievalMode: 'HYBRID'
};
});
}
});
</script>
@@ -134,6 +149,18 @@
/>
</div>
<div class="setting-title">检索方式</div>
<div class="setting-item">
<Select items={retrievalModeOptions} style="width: 100%" placeholder="请选择检索方式" onSelect={(item)=>{
const newValue = item.value;
updateNodeData(currentNodeId, ()=>{
return {
retrievalMode: newValue
}
})
}} value={data.retrievalMode ? [data.retrievalMode] : ['HYBRID']} />
</div>
<div class="setting-title">获取数据量</div>
<div class="setting-item">
@@ -184,4 +211,3 @@
}
</style>