feat: Update FAQ configuration defaults and localization for improved clarity
- Changed default FAQ configuration to use 'question_only' index mode and 'separate' question index mode for better performance. - Updated localization strings in Chinese for consistency and clarity, including terminology adjustments for indexing methods.
This commit is contained in:
@@ -1040,12 +1040,12 @@ export default {
|
|||||||
indexModeLabel: "索引方式",
|
indexModeLabel: "索引方式",
|
||||||
indexModeDescription: "仅索引问题可提升精度,索引问答可提高召回率",
|
indexModeDescription: "仅索引问题可提升精度,索引问答可提高召回率",
|
||||||
questionIndexModeLabel: "问题索引方式",
|
questionIndexModeLabel: "问题索引方式",
|
||||||
questionIndexModeDescription: "一起索引:标准问和相似问合并索引;分别索引:标准问和每个相似问独立索引,检索更精确但需要更多存储",
|
questionIndexModeDescription: "合并索引:标准问和相似问合并索引;分别索引:标准问和每个相似问独立索引,检索更精确但需要更多存储",
|
||||||
entryGuide: "FAQ 条目由标准问、相似问、反例和多个答案组成,可在知识库详情中批量导入、编辑。",
|
entryGuide: "FAQ 条目由标准问、相似问、反例和多个答案组成,可在知识库详情中批量导入、编辑。",
|
||||||
modes: {
|
modes: {
|
||||||
questionOnly: "仅标准问/相似问",
|
questionOnly: "仅标准问/相似问",
|
||||||
questionAnswer: "标准问 + 答案",
|
questionAnswer: "标准问 + 答案",
|
||||||
combined: "一起索引",
|
combined: "合并索引",
|
||||||
separate: "分别索引",
|
separate: "分别索引",
|
||||||
},
|
},
|
||||||
standardQuestion: "标准问",
|
standardQuestion: "标准问",
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
<t-radio-group
|
<t-radio-group
|
||||||
v-model="formData.type"
|
v-model="formData.type"
|
||||||
:disabled="mode === 'edit'"
|
:disabled="mode === 'edit'"
|
||||||
variant="default-filled"
|
|
||||||
>
|
>
|
||||||
<t-radio-button value="document">{{ $t('knowledgeEditor.basic.typeDocument') }}</t-radio-button>
|
<t-radio-button value="document">{{ $t('knowledgeEditor.basic.typeDocument') }}</t-radio-button>
|
||||||
<t-radio-button value="faq">{{ $t('knowledgeEditor.basic.typeFAQ') }}</t-radio-button>
|
<t-radio-button value="faq">{{ $t('knowledgeEditor.basic.typeFAQ') }}</t-radio-button>
|
||||||
@@ -97,7 +96,6 @@
|
|||||||
<label class="form-label required">{{ $t('knowledgeEditor.faq.indexModeLabel') }}</label>
|
<label class="form-label required">{{ $t('knowledgeEditor.faq.indexModeLabel') }}</label>
|
||||||
<t-radio-group
|
<t-radio-group
|
||||||
v-model="formData.faqConfig.indexMode"
|
v-model="formData.faqConfig.indexMode"
|
||||||
variant="default-filled"
|
|
||||||
>
|
>
|
||||||
<t-radio-button value="question_only">{{ $t('knowledgeEditor.faq.modes.questionOnly') }}</t-radio-button>
|
<t-radio-button value="question_only">{{ $t('knowledgeEditor.faq.modes.questionOnly') }}</t-radio-button>
|
||||||
<t-radio-button value="question_answer">{{ $t('knowledgeEditor.faq.modes.questionAnswer') }}</t-radio-button>
|
<t-radio-button value="question_answer">{{ $t('knowledgeEditor.faq.modes.questionAnswer') }}</t-radio-button>
|
||||||
@@ -108,7 +106,6 @@
|
|||||||
<label class="form-label required">{{ $t('knowledgeEditor.faq.questionIndexModeLabel') }}</label>
|
<label class="form-label required">{{ $t('knowledgeEditor.faq.questionIndexModeLabel') }}</label>
|
||||||
<t-radio-group
|
<t-radio-group
|
||||||
v-model="formData.faqConfig.questionIndexMode"
|
v-model="formData.faqConfig.questionIndexMode"
|
||||||
variant="default-filled"
|
|
||||||
>
|
>
|
||||||
<t-radio-button value="combined">{{ $t('knowledgeEditor.faq.modes.combined') }}</t-radio-button>
|
<t-radio-button value="combined">{{ $t('knowledgeEditor.faq.modes.combined') }}</t-radio-button>
|
||||||
<t-radio-button value="separate">{{ $t('knowledgeEditor.faq.modes.separate') }}</t-radio-button>
|
<t-radio-button value="separate">{{ $t('knowledgeEditor.faq.modes.separate') }}</t-radio-button>
|
||||||
@@ -227,7 +224,7 @@ watch(
|
|||||||
if (!formData.value) return
|
if (!formData.value) return
|
||||||
if (newType === 'faq') {
|
if (newType === 'faq') {
|
||||||
if (!formData.value.faqConfig) {
|
if (!formData.value.faqConfig) {
|
||||||
formData.value.faqConfig = { indexMode: 'question_answer', questionIndexMode: 'combined' }
|
formData.value.faqConfig = { indexMode: 'question_only', questionIndexMode: 'separate' }
|
||||||
}
|
}
|
||||||
if (!['basic', 'models', 'faq'].includes(currentSection.value)) {
|
if (!['basic', 'models', 'faq'].includes(currentSection.value)) {
|
||||||
currentSection.value = 'faq'
|
currentSection.value = 'faq'
|
||||||
@@ -245,7 +242,8 @@ const initFormData = (type: 'document' | 'faq' = 'document') => {
|
|||||||
name: '',
|
name: '',
|
||||||
description: '',
|
description: '',
|
||||||
faqConfig: {
|
faqConfig: {
|
||||||
indexMode: 'question_answer'
|
indexMode: 'question_only',
|
||||||
|
questionIndexMode: 'separate'
|
||||||
},
|
},
|
||||||
modelConfig: {
|
modelConfig: {
|
||||||
llmModelId: '',
|
llmModelId: '',
|
||||||
@@ -321,8 +319,8 @@ const loadKBData = async () => {
|
|||||||
name: kb.name || '',
|
name: kb.name || '',
|
||||||
description: kb.description || '',
|
description: kb.description || '',
|
||||||
faqConfig: {
|
faqConfig: {
|
||||||
indexMode: kb.faq_config?.index_mode || 'question_answer',
|
indexMode: kb.faq_config?.index_mode || 'question_only',
|
||||||
questionIndexMode: kb.faq_config?.question_index_mode || 'combined'
|
questionIndexMode: kb.faq_config?.question_index_mode || 'separate'
|
||||||
},
|
},
|
||||||
modelConfig: {
|
modelConfig: {
|
||||||
llmModelId: kb.summary_model_id || '',
|
llmModelId: kb.summary_model_id || '',
|
||||||
@@ -496,8 +494,8 @@ const buildSubmitData = () => {
|
|||||||
|
|
||||||
if (formData.value.type === 'faq') {
|
if (formData.value.type === 'faq') {
|
||||||
data.faq_config = {
|
data.faq_config = {
|
||||||
index_mode: formData.value.faqConfig?.indexMode || 'question_answer',
|
index_mode: formData.value.faqConfig?.indexMode || 'question_only',
|
||||||
question_index_mode: formData.value.faqConfig?.questionIndexMode || 'combined'
|
question_index_mode: formData.value.faqConfig?.questionIndexMode || 'separate'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -535,8 +533,8 @@ const handleSubmit = async () => {
|
|||||||
const updateConfig: any = {}
|
const updateConfig: any = {}
|
||||||
if (formData.value.type === 'faq' && formData.value.faqConfig) {
|
if (formData.value.type === 'faq' && formData.value.faqConfig) {
|
||||||
updateConfig.faq_config = {
|
updateConfig.faq_config = {
|
||||||
index_mode: formData.value.faqConfig.indexMode || 'question_answer',
|
index_mode: formData.value.faqConfig.indexMode || 'question_only',
|
||||||
question_index_mode: formData.value.faqConfig.questionIndexMode || 'combined'
|
question_index_mode: formData.value.faqConfig.questionIndexMode || 'separate'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await updateKnowledgeBase(props.kbId, {
|
await updateKnowledgeBase(props.kbId, {
|
||||||
|
|||||||
Reference in New Issue
Block a user