feat(knowledge): 添加检索设置功能

- 新增 SearchSetting 组件用于检索设置
- 在知识库详情页面添加检索设置按钮和弹窗
- 实现了向量检索、全文检索和混合检索的设置功能
- 添加了重排序模型、Top K 和 Score
This commit is contained in:
du.meimei
2025-05-06 16:44:54 +08:00
parent 0b3ad1d37c
commit ebc98af45d
8 changed files with 334 additions and 30 deletions

View File

@@ -8,40 +8,40 @@ export default Vue.extend({
*/
value: {
type: Number,
default: 0,
default: 0
},
/**
* @description 是否显示 tooltip
*/
showTooltip: {
type: Boolean,
default: true,
default: true
},
max: {
type: Number,
default: 1,
default: 1
},
step: {
type: Number,
default: 0.1,
default: 0.1
},
min: {
type: Number,
default: 0,
default: 0
},
marks: {
type: Object,
default: () => {},
default: () => {}
},
hitTest: {
type: Boolean,
default: false,
},
default: false
}
},
model: {
prop: 'value',
event: 'input',
},
event: 'input'
}
})
</script>
@@ -58,8 +58,16 @@ export default Vue.extend({
:max="max"
/>
<!-- 靠左显示 -->
<div v-if="hitTest" class="col-span-2 row-span-1" style="justify-self: start">语义 {{ (max - value).toFixed(1) }}</div>
<div
v-if="hitTest"
class="col-span-2 row-span-1"
style="justify-self: start"
>
语义 {{ (max - value).toFixed(1) }}
</div>
<!-- 靠右显示 -->
<div v-if="hitTest" class="col-span-1 row-span-1" style="justify-self: end">关键词 {{ value.toFixed(1) }}</div>
<div v-if="hitTest" class="col-span-1 row-span-1" style="justify-self: end">
关键词 {{ value.toFixed(1) }}
</div>
</div>
</template>