feat: add allow_download option to document form
This commit is contained in:
parent
b32b06391f
commit
f1c7f0f3af
@ -158,6 +158,9 @@ export default {
|
|||||||
placeholder: 'Directly return segment content',
|
placeholder: 'Directly return segment content',
|
||||||
requiredMessage: 'Please enter similarity value',
|
requiredMessage: 'Please enter similarity value',
|
||||||
},
|
},
|
||||||
|
allow_download: {
|
||||||
|
label: 'Allow download in knowledge base source',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hitHandlingMethod: {
|
hitHandlingMethod: {
|
||||||
optimization: 'Model optimization',
|
optimization: 'Model optimization',
|
||||||
|
|||||||
@ -151,6 +151,9 @@ export default {
|
|||||||
placeholder: '直接返回分段内容',
|
placeholder: '直接返回分段内容',
|
||||||
requiredMessage: '请输入相似度',
|
requiredMessage: '请输入相似度',
|
||||||
},
|
},
|
||||||
|
allow_download: {
|
||||||
|
label: '允许在知识库来源中下载',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hitHandlingMethod: {
|
hitHandlingMethod: {
|
||||||
optimization: '模型优化',
|
optimization: '模型优化',
|
||||||
|
|||||||
@ -154,6 +154,9 @@ export default {
|
|||||||
placeholder: '直接返回分段内容',
|
placeholder: '直接返回分段内容',
|
||||||
requiredMessage: '请输入相似度',
|
requiredMessage: '请输入相似度',
|
||||||
},
|
},
|
||||||
|
allow_download: {
|
||||||
|
label: '允許在知識庫來源下載',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hitHandlingMethod: {
|
hitHandlingMethod: {
|
||||||
optimization: '模型優化',
|
optimization: '模型優化',
|
||||||
|
|||||||
@ -80,6 +80,11 @@
|
|||||||
/><span>{{ $t('views.document.form.similarity.placeholder') }}</span>
|
/><span>{{ $t('views.document.form.similarity.placeholder') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item prop="allow_download">
|
||||||
|
<el-checkbox v-model="form.allow_download">
|
||||||
|
{{ $t('views.document.form.allow_download.label') }}
|
||||||
|
</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
@ -127,6 +132,7 @@ const form = ref<any>({
|
|||||||
selector: '',
|
selector: '',
|
||||||
hit_handling_method: 'optimization',
|
hit_handling_method: 'optimization',
|
||||||
directly_return_similarity: 0.9,
|
directly_return_similarity: 0.9,
|
||||||
|
allow_download: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 文档设置
|
// 文档设置
|
||||||
@ -162,6 +168,7 @@ watch(dialogVisible, (bool) => {
|
|||||||
selector: '',
|
selector: '',
|
||||||
hit_handling_method: 'optimization',
|
hit_handling_method: 'optimization',
|
||||||
directly_return_similarity: 0.9,
|
directly_return_similarity: 0.9,
|
||||||
|
allow_download: false,
|
||||||
}
|
}
|
||||||
isImport.value = false
|
isImport.value = false
|
||||||
documentType.value = ''
|
documentType.value = ''
|
||||||
@ -200,6 +207,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
const obj = {
|
const obj = {
|
||||||
source_url_list: form.value.source_url.split('\n'),
|
source_url_list: form.value.source_url.split('\n'),
|
||||||
selector: form.value.selector,
|
selector: form.value.selector,
|
||||||
|
allow_download: form.value.allow_download,
|
||||||
}
|
}
|
||||||
loadSharedApi({ type: 'document', systemType: apiType.value })
|
loadSharedApi({ type: 'document', systemType: apiType.value })
|
||||||
.postWebDocument(id, obj, loading)
|
.postWebDocument(id, obj, loading)
|
||||||
@ -219,6 +227,7 @@ const submit = async (formEl: FormInstance | undefined) => {
|
|||||||
...{
|
...{
|
||||||
source_url: form.value.source_url,
|
source_url: form.value.source_url,
|
||||||
selector: form.value.selector,
|
selector: form.value.selector,
|
||||||
|
allow_download: form.value.allow_download,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user