diff --git a/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailCard.vue b/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailCard.vue index cd929973e..fa3e4d11f 100644 --- a/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailCard.vue +++ b/ui/src/components/ai-chat/component/knowledge-source-component/ExecutionDetailCard.vue @@ -1196,10 +1196,10 @@

- {{ $t('views.document.form.selector.label') }}:{{ data.input_params.selector }} + {{ $t('views.document.form.selector.label') }}: {{ data.input_params.selector }}

- {{ $t('views.document.form.source_url.label') }}:{{ + {{ $t('views.document.form.source_url.label') }}: {{ data.input_params.source_url }}

@@ -1218,11 +1218,12 @@ :key="index" class="mb-8" > +

{{file_content.name}}

diff --git a/ui/src/views/application/component/CreateApplicationDialog.vue b/ui/src/views/application/component/CreateApplicationDialog.vue index 02c6e272c..cc5bad7ee 100644 --- a/ui/src/views/application/component/CreateApplicationDialog.vue +++ b/ui/src/views/application/component/CreateApplicationDialog.vue @@ -97,7 +97,7 @@ import applicationApi from '@/api/application/application' import { MsgSuccess, MsgAlert } from '@/utils/message' import { isWorkFlow } from '@/utils/application' import { baseNodes } from '@/workflow/common/data' -import { applicationTemplate } from '@/views/application/template' +import { applicationTemplate } from '@/workflow/common/template' import { t } from '@/locales' import useStore from '@/stores' const { user } = useStore() diff --git a/ui/src/views/application/template.ts b/ui/src/views/application/template.ts deleted file mode 100644 index b584c254a..000000000 --- a/ui/src/views/application/template.ts +++ /dev/null @@ -1,465 +0,0 @@ -import { baseNodes } from '@/workflow/common/data' -export const applicationTemplate: any = { - blank: { - edges: [], - nodes: baseNodes, - }, - assistant: { - nodes: [ - { - id: 'base-node', - type: 'base-node', - x: 120, - y: 260.30849999999987, - properties: { - config: {}, - height: 734.766, - showNode: true, - stepName: '基本信息', - node_data: { - desc: '模板', - name: '知识库问答助手', - prologue: - '您好,我是 XXX 小助手,您可以向我提出 XXX 使用问题。\n- XXX 主要功能有什么?\n- XXX 如何收费?\n- 需要转人工服务', - tts_type: 'BROWSER', - }, - input_field_list: [], - user_input_config: { - title: '用户输入', - }, - api_input_field_list: [], - user_input_field_list: [], - }, - }, - { - id: 'start-node', - type: 'start-node', - x: 120, - y: 929.6914999999999, - properties: { - config: { - fields: [ - { - label: '用户问题', - value: 'question', - }, - ], - globalFields: [ - { - label: '当前时间', - value: 'time', - }, - { - label: '历史聊天记录', - value: 'history_context', - }, - { - label: '对话 ID', - value: 'chat_id', - }, - ], - }, - fields: [ - { - label: '用户问题', - value: 'question', - }, - ], - height: 364, - showNode: true, - stepName: '开始', - globalFields: [ - { - label: '当前时间', - value: 'time', - }, - ], - }, - }, - { - id: 'fd0324fc-f5e4-4fa6-a2d9-cb251b467605', - type: 'search-knowledge-node', - x: 710, - y: 929.6914999999999, - properties: { - config: { - fields: [ - { - label: '检索结果的分段列表', - value: 'paragraph_list', - }, - { - label: '满足直接回答的分段列表', - value: 'is_hit_handling_method_list', - }, - { - label: '检索结果', - value: 'data', - }, - { - label: '满足直接回答的分段内容', - value: 'directly_return', - }, - ], - }, - height: 794, - showNode: true, - stepName: '知识库检索', - condition: 'AND', - node_data: { - knowledge_id_list: [], - knowledge_setting: { - top_n: 3, - similarity: 0.6, - search_mode: 'embedding', - max_paragraph_char_number: 5000, - }, - question_reference_address: ['start-node', 'question'], - all_knowledge_id_list: [], - knowledge_list: [], - }, - }, - }, - { - id: '420a6e4f-44ff-4847-bb81-0923630846b5', - type: 'condition-node', - x: 1300, - y: 929.6914999999999, - properties: { - width: 600, - config: { - fields: [ - { - label: '分支名称', - value: 'branch_name', - }, - ], - }, - height: 544.148, - showNode: true, - stepName: '判断器', - condition: 'AND', - node_data: { - branch: [ - { - id: '7887', - type: 'IF', - condition: 'and', - conditions: [ - { - field: ['fd0324fc-f5e4-4fa6-a2d9-cb251b467605', 'is_hit_handling_method_list'], - value: 1, - compare: 'is_not_null', - }, - ], - }, - { - id: '6847', - type: 'ELSE IF 1', - condition: 'and', - conditions: [ - { - field: ['fd0324fc-f5e4-4fa6-a2d9-cb251b467605', 'paragraph_list'], - value: 1, - compare: 'is_not_null', - }, - ], - }, - { - id: '2794', - type: 'ELSE', - condition: 'and', - conditions: [], - }, - ], - }, - branch_condition_list: [ - { - index: 0, - height: 121.383, - id: '7887', - }, - { - index: 1, - height: 121.383, - id: '6847', - }, - { - index: 2, - height: 44, - id: '2794', - }, - ], - }, - }, - { - id: '36a440a9-5b00-4d82-b13a-8e7819112918', - type: 'reply-node', - x: 1890, - y: 120, - properties: { - config: { - fields: [ - { - label: '内容', - value: 'answer', - }, - ], - }, - height: 386, - showNode: true, - stepName: '指定回复', - condition: 'AND', - node_data: { - fields: ['fd0324fc-f5e4-4fa6-a2d9-cb251b467605', 'directly_return'], - content: '', - is_result: true, - reply_type: 'referencing', - }, - }, - }, - { - id: 'f7c3b4a2-cb80-4e47-b050-7fef0315daaf', - type: 'ai-chat-node', - x: 1890, - y: 929.6914999999999, - properties: { - config: { - fields: [ - { - label: 'AI 回答内容', - value: 'answer', - }, - { - label: '思考过程', - value: 'reasoning_content', - }, - ], - }, - height: 993.383, - showNode: true, - stepName: 'AI 对话', - condition: 'AND', - node_data: { - prompt: '已知信息:\n{{知识库检索.data}}\n问题:\n{{开始.question}}', - system: '', - model_id: '', - is_result: true, - max_tokens: null, - temperature: null, - dialogue_type: 'WORKFLOW', - model_setting: { - reasoning_content_end: '', - reasoning_content_start: '', - reasoning_content_enable: false, - }, - dialogue_number: 1, - }, - }, - }, - { - id: '04dd6c1e-95f9-4757-bb3e-134d503fce54', - type: 'reply-node', - x: 1890, - y: 1798.383, - properties: { - config: { - fields: [ - { - label: '内容', - value: 'answer', - }, - ], - }, - height: 504, - showNode: true, - stepName: '指定回复1', - condition: 'AND', - node_data: { - fields: [], - content: '抱歉,没有在知识库查询到相关内容,请提供更详细的信息。', - is_result: true, - reply_type: 'content', - }, - }, - }, - ], - edges: [ - { - id: '73f8992c-65ef-409a-a151-378d0927f2aa', - type: 'app-edge', - sourceNodeId: 'start-node', - targetNodeId: 'fd0324fc-f5e4-4fa6-a2d9-cb251b467605', - startPoint: { - x: 280, - y: 929.6914999999999, - }, - endPoint: { - x: 550, - y: 929.6914999999999, - }, - properties: {}, - pointsList: [ - { - x: 280, - y: 929.6914999999999, - }, - { - x: 390, - y: 929.6914999999999, - }, - { - x: 440, - y: 929.6914999999999, - }, - { - x: 550, - y: 929.6914999999999, - }, - ], - sourceAnchorId: 'start-node_right', - targetAnchorId: 'fd0324fc-f5e4-4fa6-a2d9-cb251b467605_left', - }, - { - id: '6a8d23d9-5179-424e-80c2-f08d37cdb8d4', - type: 'app-edge', - sourceNodeId: 'fd0324fc-f5e4-4fa6-a2d9-cb251b467605', - targetNodeId: '420a6e4f-44ff-4847-bb81-0923630846b5', - startPoint: { - x: 870, - y: 929.6914999999999, - }, - endPoint: { - x: 1010, - y: 929.6914999999999, - }, - properties: {}, - pointsList: [ - { - x: 870, - y: 929.6914999999999, - }, - { - x: 980, - y: 929.6914999999999, - }, - { - x: 900, - y: 929.6914999999999, - }, - { - x: 1010, - y: 929.6914999999999, - }, - ], - sourceAnchorId: 'fd0324fc-f5e4-4fa6-a2d9-cb251b467605_right', - targetAnchorId: '420a6e4f-44ff-4847-bb81-0923630846b5_left', - }, - { - id: '56006748-d9fe-491b-a14b-04fd568cac08', - type: 'app-edge', - sourceNodeId: '420a6e4f-44ff-4847-bb81-0923630846b5', - targetNodeId: '36a440a9-5b00-4d82-b13a-8e7819112918', - startPoint: { - x: 1590, - y: 793.3089999999999, - }, - endPoint: { - x: 1730, - y: 120, - }, - properties: {}, - pointsList: [ - { - x: 1590, - y: 793.3089999999999, - }, - { - x: 1700, - y: 793.3089999999999, - }, - { - x: 1620, - y: 120, - }, - { - x: 1730, - y: 120, - }, - ], - sourceAnchorId: '420a6e4f-44ff-4847-bb81-0923630846b5_7887_right', - targetAnchorId: '36a440a9-5b00-4d82-b13a-8e7819112918_left', - }, - { - id: '9bc8721b-07aa-4730-9347-910ed64e26b9', - type: 'app-edge', - sourceNodeId: '420a6e4f-44ff-4847-bb81-0923630846b5', - targetNodeId: 'f7c3b4a2-cb80-4e47-b050-7fef0315daaf', - startPoint: { - x: 1590, - y: 922.6919999999999, - }, - endPoint: { - x: 1730, - y: 929.6914999999999, - }, - properties: {}, - pointsList: [ - { - x: 1590, - y: 922.6919999999999, - }, - { - x: 1700, - y: 922.6919999999999, - }, - { - x: 1620, - y: 929.6914999999999, - }, - { - x: 1730, - y: 929.6914999999999, - }, - ], - sourceAnchorId: '420a6e4f-44ff-4847-bb81-0923630846b5_6847_right', - targetAnchorId: 'f7c3b4a2-cb80-4e47-b050-7fef0315daaf_left', - }, - { - id: 'c276a5b6-ec29-4ab9-b911-a0a929ff193f', - type: 'app-edge', - sourceNodeId: '420a6e4f-44ff-4847-bb81-0923630846b5', - targetNodeId: '04dd6c1e-95f9-4757-bb3e-134d503fce54', - startPoint: { - x: 1590, - y: 1013.3834999999998, - }, - endPoint: { - x: 1730, - y: 1798.383, - }, - properties: {}, - pointsList: [ - { - x: 1590, - y: 1013.3834999999998, - }, - { - x: 1700, - y: 1013.3834999999998, - }, - { - x: 1620, - y: 1798.383, - }, - { - x: 1730, - y: 1798.383, - }, - ], - sourceAnchorId: '420a6e4f-44ff-4847-bb81-0923630846b5_2794_right', - targetAnchorId: '04dd6c1e-95f9-4757-bb3e-134d503fce54_left', - }, - ], - }, -} diff --git a/ui/src/views/knowledge-workflow/component/action/Result.vue b/ui/src/views/knowledge-workflow/component/action/Result.vue index e27aa9916..9a1384f0e 100644 --- a/ui/src/views/knowledge-workflow/component/action/Result.vue +++ b/ui/src/views/knowledge-workflow/component/action/Result.vue @@ -7,14 +7,14 @@ { } const toImportDoc = () => { - router.push({ + const newUrl = router.resolve({ path: `/knowledge/import/workflow/${folderId}`, query: { id: id, }, - }) + }).href + + window.open(newUrl) } /** diff --git a/ui/src/views/knowledge/KnowledgeSetting.vue b/ui/src/views/knowledge/KnowledgeSetting.vue index 61e3f55ca..5577a4ec1 100644 --- a/ui/src/views/knowledge/KnowledgeSetting.vue +++ b/ui/src/views/knowledge/KnowledgeSetting.vue @@ -8,7 +8,7 @@

{{ $t('common.info') }}

- +
- +
{{ $t('views.knowledge.knowledgeType.generalKnowledge') }}
{{ $t('views.knowledge.knowledgeType.generalInfo') }} + >{{ $t('views.knowledge.knowledgeType.generalInfo') }}
@@ -44,7 +44,7 @@ >
- +
{{ $t('views.knowledge.knowledgeType.webKnowledge') }}
@@ -61,15 +61,20 @@ v-if="detail?.type === 2" >
- - + +

{{ $t('views.knowledge.knowledgeType.larkKnowledge') }}

{{ $t('views.knowledge.knowledgeType.larkInfo') }} + >{{ $t('views.knowledge.knowledgeType.larkInfo') }}
@@ -81,12 +86,14 @@ v-if="detail?.type === 4" >
- +

- {{ $t('views.knowledge.knowledgeType.workflowKnowledge') }} + {{ + $t('views.knowledge.knowledgeType.workflowKnowledge') + }}

{{ $t('views.knowledge.knowledgeType.workflowInfo') }} @@ -161,7 +168,7 @@