mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
feat: 命中测试
This commit is contained in:
parent
554b4a6b86
commit
fada6f622c
|
|
@ -40,7 +40,7 @@
|
|||
type="textarea"
|
||||
placeholder="描述该应用的应用场景及用途,如:MaxKB 小助手回答用户提出的 MaxKB 产品使用问题"
|
||||
:rows="3"
|
||||
maxlength="500"
|
||||
maxlength="256"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -109,6 +109,7 @@
|
|||
v-model="applicationForm.model_setting.prompt"
|
||||
:rows="6"
|
||||
type="textarea"
|
||||
maxlength="2048"
|
||||
:placeholder="defaultPrompt"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
v-model="form.desc"
|
||||
type="textarea"
|
||||
placeholder="描述知识库的内容,详尽的描述将帮助AI能深入理解该知识库的内容,能更准确的检索到内容,提高该知识库的命中率。"
|
||||
maxlength="500"
|
||||
maxlength="256"
|
||||
show-word-limit
|
||||
:autosize="{ minRows: 3 }"
|
||||
@blur="form.desc = form.desc.trim()"
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<template #icon>
|
||||
<AppAvatar :name="index + 1 + ''" class="mr-12 avatar-light" :size="22" />
|
||||
</template>
|
||||
<div class="active-button primary">{{ item.similarity.toFixed(3) }}</div>
|
||||
<div class="active-button primary">{{ item.similarity?.toFixed(3) }}</div>
|
||||
<template #footer>
|
||||
<div class="footer-content flex-between">
|
||||
<el-text>
|
||||
|
|
@ -226,8 +226,9 @@ function getHitTestList() {
|
|||
|
||||
function refresh(data: any) {
|
||||
if (data) {
|
||||
const index = paragraphDetail.value.findIndex((v) => v.id === data.id)
|
||||
paragraphDetail.value.splice(index, 1, data)
|
||||
const obj = paragraphDetail.value.filter((v) => v.id === data.id)[0]
|
||||
obj.content = data.content
|
||||
obj.title = data.title
|
||||
} else {
|
||||
paragraphDetail.value = []
|
||||
getHitTestList()
|
||||
|
|
|
|||
Loading…
Reference in New Issue