diff --git a/apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py b/apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py index 34508b7bd..6ddcb6e2f 100644 --- a/apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py +++ b/apps/application/flow/step_node/document_extract_node/impl/base_document_extract_node.py @@ -40,7 +40,6 @@ splitter = '\n`-----------------------------------`\n' class BaseDocumentExtractNode(IDocumentExtractNode): def save_context(self, details, workflow_manage): self.context['content'] = details.get('content') - self.answer_text = details.get('content') def execute(self, document, chat_id, **kwargs): diff --git a/apps/application/flow/step_node/search_dataset_node/i_search_dataset_node.py b/apps/application/flow/step_node/search_dataset_node/i_search_dataset_node.py index 07eadf1da..8f15c7a32 100644 --- a/apps/application/flow/step_node/search_dataset_node/i_search_dataset_node.py +++ b/apps/application/flow/step_node/search_dataset_node/i_search_dataset_node.py @@ -66,7 +66,7 @@ class ISearchDatasetStepNode(INode): if self.flow_params_serializer.data.get('re_chat', False): history_chat_record = self.flow_params_serializer.data.get('history_chat_record', []) paragraph_id_list = [p.get('id') for p in flat_map( - [get_paragraph_list(chat_record, self.node.id) for chat_record in history_chat_record if + [get_paragraph_list(chat_record, self.runtime_node_id) for chat_record in history_chat_record if chat_record.problem_text == question])] exclude_paragraph_id_list = list(set(paragraph_id_list)) diff --git a/apps/locales/en_US/LC_MESSAGES/django.po b/apps/locales/en_US/LC_MESSAGES/django.po index 94b33f198..452f51465 100644 --- a/apps/locales/en_US/LC_MESSAGES/django.po +++ b/apps/locales/en_US/LC_MESSAGES/django.po @@ -6761,3 +6761,6 @@ msgstr "" msgid "AI reply: " msgstr "" + +msgid "The network is busy, try again later." +msgstr "" diff --git a/apps/locales/zh_CN/LC_MESSAGES/django.po b/apps/locales/zh_CN/LC_MESSAGES/django.po index 56ca8ce23..5eabfcb52 100644 --- a/apps/locales/zh_CN/LC_MESSAGES/django.po +++ b/apps/locales/zh_CN/LC_MESSAGES/django.po @@ -6900,3 +6900,6 @@ msgstr "思考过程: " msgid "AI reply: " msgstr "AI 回复: " + +msgid "The network is busy, try again later." +msgstr "网络繁忙,请稍后再试。" \ No newline at end of file diff --git a/apps/locales/zh_Hant/LC_MESSAGES/django.po b/apps/locales/zh_Hant/LC_MESSAGES/django.po index 6697b4dbd..bef312532 100644 --- a/apps/locales/zh_Hant/LC_MESSAGES/django.po +++ b/apps/locales/zh_Hant/LC_MESSAGES/django.po @@ -6911,4 +6911,7 @@ msgid "Think: " msgstr "思考過程: " msgid "AI reply: " -msgstr "AI 回覆: " \ No newline at end of file +msgstr "AI 回覆: " + +msgid "The network is busy, try again later." +msgstr "網絡繁忙,請稍後再試。" \ No newline at end of file diff --git a/ui/src/components/ai-chat/component/answer-content/index.vue b/ui/src/components/ai-chat/component/answer-content/index.vue index 4393b52ac..07307496b 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -122,7 +122,7 @@ function showSource(row: any) { return false } const regenerationChart = (chat: chatType) => { - props.sendMessage(chat.problem_text, { rechat: true }) + props.sendMessage(chat.problem_text, { re_chat: true }) } const stopChat = (chat: chatType) => { props.chatManagement.stop(chat.id) diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index e633c850a..704d825ec 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -86,6 +86,7 @@ import applicationApi from '@/api/application' import { datetimeFormat } from '@/utils/time' import { MsgError } from '@/utils/message' import { t } from '@/locales' +import bus from '@/bus' const route = useRoute() const { params: { id } @@ -277,6 +278,11 @@ const pausePlayAnswerText = () => { } onMounted(() => { + bus.on('pause-autoplay', () => { + pausePlayAnswerText() + // console.log(1234) + }) + bus.emit('pause-autoplay') // 第一次回答后自动播放, 打开历史记录不自动播放 if (props.tts && props.tts_autoplay && buttonData.value.write_ed && !buttonData.value.update_time) { playAnswerText(buttonData.value.answer_text) diff --git a/ui/src/components/ai-chat/component/user-form/index.vue b/ui/src/components/ai-chat/component/user-form/index.vue index 980ad8663..39759a831 100644 --- a/ui/src/components/ai-chat/component/user-form/index.vue +++ b/ui/src/components/ai-chat/component/user-form/index.vue @@ -16,7 +16,9 @@ + {{ inputFieldConfig.title }} + diff --git a/ui/src/components/dynamics-form/constructor/data.ts b/ui/src/components/dynamics-form/constructor/data.ts index 273a1c687..98ee4b0f6 100644 --- a/ui/src/components/dynamics-form/constructor/data.ts +++ b/ui/src/components/dynamics-form/constructor/data.ts @@ -4,6 +4,10 @@ const input_type_list = [ label: t('dynamicsForm.input_type_list.TextInput'), value: 'TextInput' }, + { + label: t('dynamicsForm.input_type_list.PasswordInput'), + value: 'PasswordInput' + }, { label: t('dynamicsForm.input_type_list.Slider'), value: 'Slider' diff --git a/ui/src/components/dynamics-form/constructor/items/PasswordInputConstructor.vue b/ui/src/components/dynamics-form/constructor/items/PasswordInputConstructor.vue new file mode 100644 index 000000000..dd447966e --- /dev/null +++ b/ui/src/components/dynamics-form/constructor/items/PasswordInputConstructor.vue @@ -0,0 +1,194 @@ + + + diff --git a/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue b/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue index ccac26de6..7d9715377 100644 --- a/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue +++ b/ui/src/components/dynamics-form/constructor/items/TextInputConstructor.vue @@ -1,11 +1,4 @@ @@ -111,9 +103,7 @@ const getData = () => { attrs: { maxlength: formValue.value.maxlength, minlength: formValue.value.minlength, - 'show-word-limit': true, - type: formValue.value.show_password ? 'password' : 'text', - 'show-password': formValue.value.show_password + 'show-word-limit': true }, default_value: formValue.value.default_value, show_default_value: formValue.value.show_default_value, @@ -145,7 +135,6 @@ const rander = (form_data: any) => { formValue.value.maxlength = attrs.maxlength formValue.value.default_value = form_data.default_value formValue.value.show_default_value = form_data.show_default_value - formValue.value.show_password = attrs['show-password'] } const rangeRules = [ { @@ -176,8 +165,7 @@ onMounted(() => { formValue.value.minlength = 0 formValue.value.maxlength = 20 formValue.value.default_value = '' - formValue.value.show_password = false - + // console.log(formValue.value.show_default_value) if (formValue.value.show_default_value === undefined) { formValue.value.show_default_value = true } diff --git a/ui/src/components/generate-related-dialog/index.vue b/ui/src/components/generate-related-dialog/index.vue index 4d485eae0..373152361 100644 --- a/ui/src/components/generate-related-dialog/index.vue +++ b/ui/src/components/generate-related-dialog/index.vue @@ -48,13 +48,13 @@ type="textarea" /> - + - {{ - $t('views.document.form.selectVectorization.error') + {{ + $t('components.selectParagraph.error') }} {{ - $t('views.document.form.selectVectorization.all') + $t('components.selectParagraph.all') }} @@ -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')) diff --git a/ui/src/locales/lang/en-US/common.ts b/ui/src/locales/lang/en-US/common.ts index 7c2996d35..e8fbb87e9 100644 --- a/ui/src/locales/lang/en-US/common.ts +++ b/ui/src/locales/lang/en-US/common.ts @@ -57,5 +57,6 @@ export default { inputPlaceholder: 'Please input', title: 'Title', - content: 'Content' + content: 'Content', + rename: 'Rename' } diff --git a/ui/src/locales/lang/en-US/components.ts b/ui/src/locales/lang/en-US/components.ts index ce54bd265..fd63f8345 100644 --- a/ui/src/locales/lang/en-US/components.ts +++ b/ui/src/locales/lang/en-US/components.ts @@ -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' + } } diff --git a/ui/src/locales/lang/en-US/dynamics-form.ts b/ui/src/locales/lang/en-US/dynamics-form.ts index 9e1c4c24d..2cfcd8058 100644 --- a/ui/src/locales/lang/en-US/dynamics-form.ts +++ b/ui/src/locales/lang/en-US/dynamics-form.ts @@ -1,6 +1,7 @@ export default { input_type_list: { TextInput: 'Input', + PasswordInput: 'Password', Slider: 'Slider', SwitchInput: 'Switch', SingleSelect: 'Single Select', @@ -96,7 +97,6 @@ export default { requiredMessage2: 'and', requiredMessage3: 'characters', requiredMessage4: 'Text length is a required parameter' - }, - showPassword: 'Show Password' + } } } diff --git a/ui/src/locales/lang/en-US/views/application-workflow.ts b/ui/src/locales/lang/en-US/views/application-workflow.ts index 3ac6c265c..6e1aa8c67 100644 --- a/ui/src/locales/lang/en-US/views/application-workflow.ts +++ b/ui/src/locales/lang/en-US/views/application-workflow.ts @@ -1,5 +1,6 @@ export default { node: 'Node', + nodeName: 'Node Name', baseComponent: 'Basic', nodeSetting: 'Node Settings', workflow: 'Workflow', diff --git a/ui/src/locales/lang/en-US/views/document.ts b/ui/src/locales/lang/en-US/views/document.ts index 14867b162..8eefd00fa 100644 --- a/ui/src/locales/lang/en-US/views/document.ts +++ b/ui/src/locales/lang/en-US/views/document.ts @@ -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.' } } diff --git a/ui/src/locales/lang/en-US/views/problem.ts b/ui/src/locales/lang/en-US/views/problem.ts index f312cce6a..cd9780b59 100644 --- a/ui/src/locales/lang/en-US/views/problem.ts +++ b/ui/src/locales/lang/en-US/views/problem.ts @@ -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' } diff --git a/ui/src/locales/lang/zh-CN/common.ts b/ui/src/locales/lang/zh-CN/common.ts index 1bd88784f..cdcde3d60 100644 --- a/ui/src/locales/lang/zh-CN/common.ts +++ b/ui/src/locales/lang/zh-CN/common.ts @@ -56,5 +56,6 @@ export default { param: { outputParam: '输出参数', inputParam:'输入参数' - } + }, + rename:'重命名' } diff --git a/ui/src/locales/lang/zh-CN/components.ts b/ui/src/locales/lang/zh-CN/components.ts index 589a14337..5b871daf1 100644 --- a/ui/src/locales/lang/zh-CN/components.ts +++ b/ui/src/locales/lang/zh-CN/components.ts @@ -4,4 +4,9 @@ export default { noData: '无匹配数据', loading: '加载中', noMore: '到底啦!', + selectParagraph: { + title: '选择分段', + error: '仅执行未成功分段', + all: '全部分段' + } } diff --git a/ui/src/locales/lang/zh-CN/dynamics-form.ts b/ui/src/locales/lang/zh-CN/dynamics-form.ts index 31b0180df..9814c06eb 100644 --- a/ui/src/locales/lang/zh-CN/dynamics-form.ts +++ b/ui/src/locales/lang/zh-CN/dynamics-form.ts @@ -1,6 +1,7 @@ export default { input_type_list: { TextInput: '文本框', + PasswordInput: '密码框', Slider: '滑块', SwitchInput: '开关', SingleSelect: '单选框', @@ -96,7 +97,6 @@ export default { requiredMessage2: '到', requiredMessage3: '个字符', requiredMessage4: '文本长度为必填参数' - }, - showPassword: '密文显示' + } } } diff --git a/ui/src/locales/lang/zh-CN/views/application-workflow.ts b/ui/src/locales/lang/zh-CN/views/application-workflow.ts index 95d73605f..010964bb0 100644 --- a/ui/src/locales/lang/zh-CN/views/application-workflow.ts +++ b/ui/src/locales/lang/zh-CN/views/application-workflow.ts @@ -1,5 +1,6 @@ export default { node: '节点', + nodeName: '节点名称', baseComponent: '基础组件', nodeSetting: '节点设置', workflow: '工作流', diff --git a/ui/src/locales/lang/zh-CN/views/document.ts b/ui/src/locales/lang/zh-CN/views/document.ts index a5ca5a4a3..73a1ef6e9 100644 --- a/ui/src/locales/lang/zh-CN/views/document.ts +++ b/ui/src/locales/lang/zh-CN/views/document.ts @@ -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: '仅执行未成功的分段', } } diff --git a/ui/src/locales/lang/zh-CN/views/problem.ts b/ui/src/locales/lang/zh-CN/views/problem.ts index 53fc24c98..bb53275aa 100644 --- a/ui/src/locales/lang/zh-CN/views/problem.ts +++ b/ui/src/locales/lang/zh-CN/views/problem.ts @@ -31,7 +31,6 @@ export default { title: '关联分段', selectDocument: '选择文档', placeholder: '按 文档名称 搜索', - selectParagraph: '选择分段', selectedParagraph: '已选分段', count: '个' }, diff --git a/ui/src/locales/lang/zh-Hant/common.ts b/ui/src/locales/lang/zh-Hant/common.ts index 9adcf372b..3281456de 100644 --- a/ui/src/locales/lang/zh-Hant/common.ts +++ b/ui/src/locales/lang/zh-Hant/common.ts @@ -55,6 +55,7 @@ export default { content: '内容', param: { outputParam: '輸出參數', - inputParam:'輸入參數' - } + inputParam: '輸入參數' + }, + rename: '重命名' } diff --git a/ui/src/locales/lang/zh-Hant/components.ts b/ui/src/locales/lang/zh-Hant/components.ts index a7c3592cf..da25a3709 100644 --- a/ui/src/locales/lang/zh-Hant/components.ts +++ b/ui/src/locales/lang/zh-Hant/components.ts @@ -4,4 +4,9 @@ export default { noData: '無匹配数据', loading: '加載中', noMore: '到底啦!', + selectParagraph: { + title: '選擇分段', + error: '僅執行未成功分段', + all: '全部分段' + } } diff --git a/ui/src/locales/lang/zh-Hant/dynamics-form.ts b/ui/src/locales/lang/zh-Hant/dynamics-form.ts index 750cd4296..e75c2393d 100644 --- a/ui/src/locales/lang/zh-Hant/dynamics-form.ts +++ b/ui/src/locales/lang/zh-Hant/dynamics-form.ts @@ -1,6 +1,7 @@ export default { input_type_list: { TextInput: '文字框', + PasswordInput: '密文框', Slider: '滑桿', SwitchInput: '開關', SingleSelect: '單選框', @@ -96,7 +97,6 @@ export default { requiredMessage2: '到', requiredMessage3: '個字元', requiredMessage4: '文字長度為必填參數' - }, - showPassword: '密文顯示' + } } } diff --git a/ui/src/locales/lang/zh-Hant/views/application-workflow.ts b/ui/src/locales/lang/zh-Hant/views/application-workflow.ts index e3491eb77..b8cf46469 100644 --- a/ui/src/locales/lang/zh-Hant/views/application-workflow.ts +++ b/ui/src/locales/lang/zh-Hant/views/application-workflow.ts @@ -1,5 +1,6 @@ export default { node: '節點', + nodeName: '節點名稱', baseComponent: '基礎組件', nodeSetting: '節點設置', workflow: '工作流', diff --git a/ui/src/locales/lang/zh-Hant/views/document.ts b/ui/src/locales/lang/zh-Hant/views/document.ts index 087fab73b..383958afd 100644 --- a/ui/src/locales/lang/zh-Hant/views/document.ts +++ b/ui/src/locales/lang/zh-Hant/views/document.ts @@ -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: '只執行未成功的分段', } } diff --git a/ui/src/locales/lang/zh-Hant/views/problem.ts b/ui/src/locales/lang/zh-Hant/views/problem.ts index 0fb8b30d9..12cb86020 100644 --- a/ui/src/locales/lang/zh-Hant/views/problem.ts +++ b/ui/src/locales/lang/zh-Hant/views/problem.ts @@ -31,7 +31,6 @@ export default { title: '關聯分段', selectDocument: '選擇文件', placeholder: '按 文件名稱 搜尋', - selectParagraph: '選擇分段', selectedParagraph: '已選分段', count: '個' }, diff --git a/ui/src/views/document/component/EmbeddingContentDialog.vue b/ui/src/views/document/component/EmbeddingContentDialog.vue index 4ceb05639..8d3616ec8 100644 --- a/ui/src/views/document/component/EmbeddingContentDialog.vue +++ b/ui/src/views/document/component/EmbeddingContentDialog.vue @@ -1,15 +1,15 @@