fix: Modify generate question page translation and bugs
This commit is contained in:
parent
d5f867c76c
commit
54ebfc30f2
@ -16,7 +16,9 @@
|
||||
<el-icon class="mr-8 arrow-icon" :class="showUserInput ? 'rotate-90' : ''"
|
||||
><CaretRight
|
||||
/></el-icon>
|
||||
<span class="break-all ellipsis-1 mr-16" :title="inputFieldConfig.title">
|
||||
{{ inputFieldConfig.title }}
|
||||
</span>
|
||||
</div>
|
||||
<el-scrollbar max-height="160">
|
||||
<el-collapse-transition>
|
||||
|
||||
@ -48,13 +48,13 @@
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('views.problem.relateParagraph.selectParagraph')" prop="state">
|
||||
<el-form-item v-if="apiType === 'document'" :label="$t('components.selectParagraph.title')" prop="state">
|
||||
<el-radio-group v-model="state" class="radio-block">
|
||||
<el-radio value="error" size="large" class="mb-16">{{
|
||||
$t('views.document.form.selectVectorization.error')
|
||||
<el-radio value="error" size="large">{{
|
||||
$t('components.selectParagraph.error')
|
||||
}}</el-radio>
|
||||
<el-radio value="all" size="large">{{
|
||||
$t('views.document.form.selectVectorization.all')
|
||||
$t('components.selectParagraph.all')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@ -148,7 +148,6 @@ const submitHandle = async (formEl: FormInstance) => {
|
||||
const data = {
|
||||
...form.value,
|
||||
paragraph_id_list: idList.value,
|
||||
state_list: stateMap[state.value]
|
||||
}
|
||||
paragraphApi.batchGenerateRelated(id, documentId, data, loading).then(() => {
|
||||
MsgSuccess(t('views.document.generateQuestion.successMessage'))
|
||||
|
||||
@ -3,5 +3,10 @@ export default {
|
||||
quickCreateName: 'document name',
|
||||
noData: 'No Data',
|
||||
loading: 'Loading',
|
||||
noMore: 'No more!'
|
||||
noMore: 'No more! ',
|
||||
selectParagraph: {
|
||||
title: 'Select Paragraph',
|
||||
error: 'Process only the failed segments',
|
||||
all: 'All Segments'
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ export default {
|
||||
cancelGenerateQuestion: 'Cancel Generating Questions',
|
||||
cancelVectorization: 'Cancel Vectorization',
|
||||
cancelGenerate: 'Cancel Generation',
|
||||
export: 'Export to',
|
||||
export: 'Export to'
|
||||
},
|
||||
tip: {
|
||||
saveMessage: 'Current changes have not been saved. Confirm exit?',
|
||||
@ -84,8 +84,7 @@ export default {
|
||||
text: 'Remove duplicate extra symbols, spaces, blank lines, and tab words.'
|
||||
},
|
||||
checkedConnect: {
|
||||
label:
|
||||
'Add "Related Questions" section for question-based QA pairs during import.'
|
||||
label: 'Add "Related Questions" section for question-based QA pairs during import.'
|
||||
}
|
||||
},
|
||||
buttons: {
|
||||
@ -153,11 +152,6 @@ export default {
|
||||
label: 'Similarity Higher Than',
|
||||
placeholder: 'Directly return segment content',
|
||||
requiredMessage: 'Please enter similarity value'
|
||||
},
|
||||
selectVectorization: {
|
||||
label: 'Select Vectorization Content',
|
||||
error: 'Segments that failed vectorization',
|
||||
all: 'All Segments'
|
||||
}
|
||||
},
|
||||
hitHandlingMethod: {
|
||||
@ -173,7 +167,6 @@ export default {
|
||||
tip4: 'The generation effect depends on the selected model and prompt. Users can adjust to achieve the best effect.',
|
||||
prompt1:
|
||||
'Content: {data}\n \n Please summarize the above and generate 5 questions based on the summary. \nAnswer requirements: \n - Please output only questions; \n - Please place each question in',
|
||||
prompt2: 'tag.',
|
||||
error: 'Segments only failed',
|
||||
prompt2: 'tag.'
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,6 @@ export default {
|
||||
title: 'Relate to Segment',
|
||||
selectDocument: 'Select a Document',
|
||||
placeholder: 'Search document by name',
|
||||
selectParagraph: 'Select Segments',
|
||||
selectedParagraph: 'Selected Segments',
|
||||
count: 'Count'
|
||||
}
|
||||
|
||||
@ -4,4 +4,9 @@ export default {
|
||||
noData: '无匹配数据',
|
||||
loading: '加载中',
|
||||
noMore: '到底啦!',
|
||||
selectParagraph: {
|
||||
title: '选择分段',
|
||||
error: '仅执行未成功分段',
|
||||
all: '全部分段'
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,11 +150,6 @@ export default {
|
||||
placeholder: '直接返回分段内容',
|
||||
requiredMessage: '请输入相似度'
|
||||
},
|
||||
selectVectorization: {
|
||||
label: '选择向量化内容',
|
||||
error: '向量化未成功的分段',
|
||||
all: '全部分段'
|
||||
}
|
||||
},
|
||||
hitHandlingMethod: {
|
||||
optimization: '模型优化',
|
||||
@ -169,6 +164,5 @@ export default {
|
||||
tip4: '生成效果依赖于所选模型和提示词,用户可自行调整至最佳效果。',
|
||||
prompt1: `内容:{data}\n\n请总结上面的内容,并根据内容总结生成 5 个问题。\n回答要求:\n- 请只输出问题;\n- 请将每个问题放置`,
|
||||
prompt2: `标签中。`,
|
||||
error: '仅执行未成功的分段',
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,6 @@ export default {
|
||||
title: '关联分段',
|
||||
selectDocument: '选择文档',
|
||||
placeholder: '按 文档名称 搜索',
|
||||
selectParagraph: '选择分段',
|
||||
selectedParagraph: '已选分段',
|
||||
count: '个'
|
||||
},
|
||||
|
||||
@ -4,4 +4,9 @@ export default {
|
||||
noData: '無匹配数据',
|
||||
loading: '加載中',
|
||||
noMore: '到底啦!',
|
||||
selectParagraph: {
|
||||
title: '選擇分段',
|
||||
error: '僅執行未成功分段',
|
||||
all: '全部分段'
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,11 +150,6 @@ export default {
|
||||
placeholder: '直接返回分段内容',
|
||||
requiredMessage: '请输入相似度'
|
||||
},
|
||||
selectVectorization: {
|
||||
label: '選擇向量化',
|
||||
error: '向量化未成功的分段',
|
||||
all: '全部分段'
|
||||
}
|
||||
},
|
||||
hitHandlingMethod: {
|
||||
optimization: '模型優化',
|
||||
@ -169,6 +164,5 @@ export default {
|
||||
tip4: '生成效果取決於所選模型和提示詞,用戶可自行調整至最佳效果。',
|
||||
prompt1: `內容:{data}\n\n請總結上面的內容,並根據內容總結生成 5 個問題。\n回答要求:\n - 請只輸出問題;\n - 請將每個問題放置在`,
|
||||
prompt2: `標籤中。`,
|
||||
error: '只執行未成功的分段',
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,6 @@ export default {
|
||||
title: '關聯分段',
|
||||
selectDocument: '選擇文件',
|
||||
placeholder: '按 文件名稱 搜尋',
|
||||
selectParagraph: '選擇分段',
|
||||
selectedParagraph: '已選分段',
|
||||
count: '個'
|
||||
},
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="$t('views.document.form.selectVectorization.label')"
|
||||
:title="$t('components.selectParagraph.title')"
|
||||
:before-close="close"
|
||||
>
|
||||
<el-radio-group v-model="state" class="radio-block">
|
||||
<el-radio value="error" size="large" class="mb-16">{{
|
||||
$t('views.document.form.selectVectorization.error')
|
||||
$t('components.selectParagraph.error')
|
||||
}}</el-radio>
|
||||
<el-radio value="all" size="large">{{
|
||||
$t('views.document.form.selectVectorization.all')
|
||||
$t('components.selectParagraph.all')
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
<template #footer>
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
<div class="p-24" style="padding-bottom: 8px; padding-top: 16px">
|
||||
<div class="flex-between mb-16">
|
||||
<div class="bold title align-center">
|
||||
{{ $t('views.problem.relateParagraph.selectParagraph') }}
|
||||
{{ $t('components.selectParagraph.title') }}
|
||||
<el-text>
|
||||
({{ $t('views.problem.relateParagraph.selectedParagraph') }}:{{
|
||||
associationCount(currentDocument)
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<span class="dialog-footer">
|
||||
<el-button @click.prevent="dialogVisible = false"> {{ $t('common.cancel') }} </el-button>
|
||||
<el-button type="primary" @click="submit(fieldFormRef)" :loading="loading">
|
||||
{{ isEdit ? $t('common.save') : $t('common.add') }}
|
||||
{{ $t('common.save') }}
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
@ -43,14 +43,15 @@ const emit = defineEmits(['refresh'])
|
||||
|
||||
const fieldFormRef = ref()
|
||||
const loading = ref<boolean>(false)
|
||||
const isEdit = ref(false)
|
||||
|
||||
const form = ref<any>({
|
||||
title: t('chat.userInput') ,
|
||||
title: t('chat.userInput')
|
||||
})
|
||||
|
||||
const rules = reactive({
|
||||
title: [{ required: true, message: t('dynamicsForm.paramForm.name.requiredMessage'), trigger: 'blur' }],
|
||||
title: [
|
||||
{ required: true, message: t('dynamicsForm.paramForm.name.requiredMessage'), trigger: 'blur' }
|
||||
]
|
||||
})
|
||||
|
||||
const dialogVisible = ref<boolean>(false)
|
||||
@ -58,7 +59,6 @@ const dialogVisible = ref<boolean>(false)
|
||||
const open = (row: any) => {
|
||||
if (row) {
|
||||
form.value = cloneDeep(row)
|
||||
isEdit.value = true
|
||||
}
|
||||
|
||||
dialogVisible.value = true
|
||||
@ -66,7 +66,6 @@ const open = (row: any) => {
|
||||
|
||||
const close = () => {
|
||||
dialogVisible.value = false
|
||||
isEdit.value = false
|
||||
}
|
||||
|
||||
const submit = async (formEl: FormInstance | undefined) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user