📂

文件翻译

暂无描述

⬡ 19 节点 ↓ 9 下载 ⚙ advanced-chat ⭐ 85/100 2026-05-28

工作流图谱

YAML 源码

app:
  description: ''
  icon: 📂
  icon_background: '#E0F2FE'
  mode: advanced-chat
  name: 文件翻译
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/openai:0.0.13@9caa0421b5519db036aaccdbf1980d1071550767d6c59e9d9388dd386a92e9f6
kind: app
version: 0.1.5
workflow:
  conversation_variables:
  - description: 'Text to be translated. '
    id: e520bb9f-da6f-49a3-9da6-a3c74f1d68d6
    name: text
    selector:
    - conversation
    - text
    value: ''
    value_type: string
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - image
      allowed_file_upload_methods:
      - local_file
      - remote_url
      enabled: false
      fileUploadConfig:
        audio_file_size_limit: 50
        batch_count_limit: 5
        file_size_limit: 15
        image_file_size_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 10
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 3
    opening_statement: ''
    retriever_resource:
      enabled: false
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: document-extractor
      id: 1727235780030-true-1727235420145-target
      selected: false
      source: '1727235780030'
      sourceHandle: 'true'
      target: '1727235420145'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: assigner
        targetType: answer
      id: 1727243290238-source-1727243331745-target
      selected: false
      source: '1727243290238'
      sourceHandle: source
      target: '1727243331745'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1727244691213-source-1727244764225-target
      selected: false
      source: '1727244691213'
      sourceHandle: source
      target: '1727244764225'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 17272454043470-source-1727245512406-target
      selected: false
      source: '17272454043470'
      sourceHandle: source
      target: '1727245512406'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727245644467-source-17272454043470-target
      selected: false
      source: '1727245644467'
      sourceHandle: source
      target: '17272454043470'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1727235780030-d8e58cc8-8c7c-4426-a596-32178b8fc6df-1727245644467-target
      selected: false
      source: '1727235780030'
      sourceHandle: d8e58cc8-8c7c-4426-a596-32178b8fc6df
      target: '1727245644467'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: if-else
      id: 1727234055352-source-1727235780030-target
      selected: false
      source: '1727234055352'
      sourceHandle: source
      target: '1727235780030'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: document-extractor
        targetType: assigner
      id: 1727235420145-source-1727243290238-target
      source: '1727235420145'
      sourceHandle: source
      target: '1727243290238'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: answer
        targetType: llm
      id: 1727243331745-source-1727244691213-target
      source: '1727243331745'
      sourceHandle: source
      target: '1727244691213'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - allowed_file_extensions: []
          allowed_file_types:
          - document
          allowed_file_upload_methods:
          - local_file
          - remote_url
          label: 需要翻译的文件:
          max_length: 5
          options: []
          required: true
          type: file
          variable: text
        - label: 目标语言:
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: target_language
      height: 116
      id: '1727234055352'
      position:
        x: 30
        y: 286.5
      positionAbsolute:
        x: 30
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_array_file: false
        selected: false
        title: 文档提取器
        type: document-extractor
        variable_selector:
        - '1727234055352'
        - text
      height: 92
      id: '1727235420145'
      position:
        x: 638
        y: 286.5
      positionAbsolute:
        x: 638
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: '='
            id: aedd7231-30bc-450e-830f-068697835bc5
            value: '1'
            varType: number
            variable_selector:
            - sys
            - dialogue_count
          id: 'true'
          logical_operator: and
        - case_id: d8e58cc8-8c7c-4426-a596-32178b8fc6df
          conditions:
          - comparison_operator: '>'
            id: 6f2dfa0d-f898-49d6-9d10-cd61ce884bed
            value: '1'
            varType: number
            variable_selector:
            - sys
            - dialogue_count
          id: d8e58cc8-8c7c-4426-a596-32178b8fc6df
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 174
      id: '1727235780030'
      position:
        x: 334
        y: 286.5
      positionAbsolute:
        x: 334
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        assigned_variable_selector:
        - conversation
        - text
        desc: ''
        input_variable_selector:
        - '1727235420145'
        - text
        selected: false
        title: 变量赋值
        type: assigner
        write_mode: over-write
      height: 88
      id: '1727243290238'
      position:
        x: 942
        y: 286.5
      positionAbsolute:
        x: 942
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: 'Document Processed! '
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 102
      id: '1727243331745'
      position:
        x: 1246
        y: 286.5
      positionAbsolute:
        x: 1246
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: langgenius/openai/openai
        prompt_template:
        - id: 28742294-85bb-4612-8e4e-6e590bb48c99
          role: system
          text: '您是一位能够翻译多种语言的译员。您的任务是将给定的文本从源语言准确地翻译成 {{#1727234055352.target_language#}}。请按照以下步骤完成任务:


            1. 识别输入文本的源语言。​​

            2. 将文本翻译成 {{#1727234055352.target_language#}}。

            3. 确保翻译保留原始含义和上下文。

            4. 在翻译文本中使用正确的语法、标点和句法。


            确保适当处理惯用表达和文化差异。如果输入文本包含任何专业术语或行话,请确保翻译反映目标语言中的正确术语。'
        - id: 90c836a7-2dd0-4221-99b5-220ee47395fd
          role: user
          text: '{{#1727235420145.text#}}'
        selected: false
        title: LLM 翻译
        type: llm
        variables: []
        vision:
          enabled: false
      height: 96
      id: '1727244691213'
      position:
        x: 1548.5714285714287
        y: 286.5
      positionAbsolute:
        x: 1548.5714285714287
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1727244691213.text#}}'
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 105
      id: '1727244764225'
      position:
        x: 1854
        y: 286.5
      positionAbsolute:
        x: 1854
        y: 286.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: langgenius/openai/openai
        prompt_template:
        - id: 28742294-85bb-4612-8e4e-6e590bb48c99
          role: system
          text: '<instructions>

            您是一位能够翻译多种语言的翻译人员。您的任务是将给定的文本从源语言准确地翻译成{{#1727234055352.target_language#}}。请按照以下步骤完成任务:


            1. 识...(过长已截断)