app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: 翻译小助手
  use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
  type: marketplace
  value:
    marketplace_plugin_unique_identifier: langgenius/volcengine_maas:0.0.7@f8e44422cfa5b9a6ac1f2d3b43ef1069868efdad1e5cec2590de3f53ceac37b0
kind: app
version: 0.1.5
workflow:
  conversation_variables: []
  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: 5000
        batch_count_limit: 50
        file_size_limit: 1024
        image_file_size_limit: 1000
        video_file_size_limit: 10000
        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: true
    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
        isInLoop: false
        sourceType: start
        targetType: llm
      id: 1741863781270-source-1741876971157-target
      source: '1741863781270'
      sourceHandle: source
      target: '1741876971157'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: llm
      id: 1741876971157-source-1741864528014-target
      source: '1741876971157'
      sourceHandle: source
      target: '1741864528014'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: llm
        targetType: if-else
      id: 1741864528014-source-1741877839025-target
      source: '1741864528014'
      sourceHandle: source
      target: '1741877839025'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: 1741877839025-true-1741877931531-target
      source: '1741877839025'
      sourceHandle: 'true'
      target: '1741877931531'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: if-else
        targetType: llm
      id: 1741877839025-false-1741878015558-target
      source: '1741877839025'
      sourceHandle: 'false'
      target: '1741878015558'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: 1741877931531-source-1741878523112-target
      source: '1741877931531'
      sourceHandle: source
      target: '1741878523112'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: variable-aggregator
      id: 1741878015558-source-1741878523112-target
      source: '1741878015558'
      sourceHandle: source
      target: '1741878523112'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        isInLoop: false
        sourceType: variable-aggregator
        targetType: llm
      id: 1741878523112--1741878566278-target
      source: '1741878523112'
      sourceHandle: source
      target: '1741878566278'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInLoop: false
        sourceType: llm
        targetType: end
      id: 1741878566278-source-1741865222633-target
      source: '1741878566278'
      sourceHandle: source
      target: '1741865222633'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: 需要翻译文本字符串
          max_length: 2048
          options: []
          required: true
          type: paragraph
          variable: source_str
        - label: 目标语言
          max_length: 48
          options:
          - 英语
          - 中文（简体）
          - 日语
          required: true
          type: select
          variable: target_language
        - label: 风格
          max_length: 48
          options:
          - ''
          - 口语
          - 书面语
          required: false
          type: select
          variable: style
      height: 142
      id: '1741863781270'
      position:
        x: -647
        y: 292
      positionAbsolute:
        x: -647
        y: 292
      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: DeepSeek-V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: f2f4ebc0-687d-40ec-90d2-a986407eb8e9
          role: system
          text: '你是一位专业的语言学家，专门从事{{#1741876971157.text#}}到{{#1741863781270.target_language#}}的翻译工作。



            你的任务是从到{{#1741876971157.text#}}到{{#1741863781270.target_language#}}的翻译工作，请提供{{#1741863781270.source_str#}}的{{#1741863781270.target_language#}}翻译。


            请只提供翻译内容，不要提供任何解释或其他文本。

            '
        selected: true
        title: 初始翻译LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 90
      id: '1741864528014'
      position:
        x: -342.76356717080813
        y: 193.74893371877687
      positionAbsolute:
        x: -342.76356717080813
        y: 193.74893371877687
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1741878566278'
          - text
          variable: result
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1741865222633'
      position:
        x: 198.56836347844597
        y: -5.258497887073361
      positionAbsolute:
        x: 198.56836347844597
        y: -5.258497887073361
      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: DeepSeek-V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: e531d7a8-b4cd-4579-9593-b46ebb40a4bb
          role: system
          text: '你需要根据{{#1741863781270.source_str#}}确定当前语种，并返回结果

            只需要返回语种名称，不需要额外内容'
        selected: false
        title: 自动识别语种LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 90
      id: '1741876971157'
      position:
        x: -342.76356717080813
        y: -5.258497887073361
      positionAbsolute:
        x: -342.76356717080813
        y: -5.258497887073361
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: not empty
            id: 7db708f3-a3bb-4688-8ad2-8dff624a6e96
            value: 口语
            varType: string
            variable_selector:
            - '1741863781270'
            - style
          id: 'true'
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 126
      id: '1741877839025'
      position:
        x: -342.76356717080813
        y: 375.33506138785646
      positionAbsolute:
        x: -342.76356717080813
        y: 375.33506138785646
      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: DeepSeek-V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: e903879e-6e58-4179-8f3f-db8a6e0983fd
          role: system
          text: '你是一位专业的语言学家，专门从事到{{#1741876971157.text#}}}的{{#1741863781270.target_language#}}翻译工作。你将获得一段源文本及其翻译，你的目标是改进这个翻译。


            你的任务是仔细阅读一段源文本及其从{{#1741876971157.text#}}到{{#1741863781270.target_language#}}的翻译，然后给出建设性的批评和有助于改进翻译的建议。


            最终的翻译风格和语气应该符合{{#1741863781270.style#}}表达方式。


            源文本和初始翻译用XML标签<SOURCE_STR></SOURCE_STR>和<TRANSLATION></TRANSLATION>标记如下：


            <SOURCE_STR>

            {{#1741863781270.source_str#}}

            </SOURCE_STR>


            <TRANSLATION>

            {{#1741864528014.text#}}

            </TRANSLATION>


            在写建议时，请注意是否有以下方面可以改进：

            (i) 准确性（通过纠正添加错误、误译、遗漏或未翻译的文本）

            (ii) 流畅性（通过应用的语法、拼写和标点规则，确保没有不必要的重复）

            (iii) 风格（通过确保翻译反映源文本的风格并考虑文化背景）

            (iv) 术语（通过确保术语使用的一致性并反映源文本领域；确保只使用中对等的习语）


            请列出具体的、有帮助的和建设性的建议来改进翻译。

            每个建议应针对翻译的一个具体部分。

            只输出建议，不要输出其他内容。'
        selected: false
        title: 反思优化——风格LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 90
      id: '1741877931531'
      position:
        x: 16.763796930477326
        y: 241.98041214406868
      positionAbsolute:
        x: 16.763796930477326
        y: 241.98041214406868
      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: DeepSeek-V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: 78d9f716-fbc8-458a-b717-b7315af483e5
          role: system
          text: '你是一位专业的语言学家，专门从事到{{#1741876971157.text#}}}的{{#1741863781270.target_language#}}翻译工作。你将获得一段源文本及其翻译，你的目标是改进这个翻译。


            你的任务是仔细阅读一段源文本及其从{{#1741876971157.text#}}到{{#1741863781270.target_language#}}的翻译，然后给出建设性的批评和有助于改进翻译的建议。



            源文本和初始翻译用XML标签<SOURCE_STR></SOURCE_STR>和<TRANSLATION></TRANSLATION>标记如下：


            <SOURCE_TEXT>

            {{#1741863781270.source_str#}}

            </SOURCE_TEXT>


            <TRANSLATION>

            {{#1741864528014.text#}}

            </TRANSLATION>


            在写建议时，请注意是否有以下方面可以改进：

            (i) 准确性（通过纠正添加错误、误译、遗漏或未翻译的文本）

            (ii) 流畅性（通过应用的语法、拼写和标点规则，确保没有不必要的重复）

            (iii) 风格（通过确保翻译反映源文本的风格并考虑文化背景）

            (iv) 术语（通过确保术语使用的一致性并反映源文本领域；确保只使用中对等的习语）



            请列出具体的、有帮助的和建设性的建议来改进翻译。

            每个建议应针对翻译的一个具体部分。

            只输出建议，不要输出其他内容。'
        selected: false
        title: 反思优化LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 90
      id: '1741878015558'
      position:
        x: 36.92141881660518
        y: 574.5719896574386
      positionAbsolute:
        x: 36.92141881660518
        y: 574.5719896574386
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        output_type: string
        selected: false
        title: 变量聚合器
        type: variable-aggregator
        variables:
        - - '1741878015558'
          - text
        - - '1741877931531'
          - text
      height: 130
      id: '1741878523112'
      position:
        x: 427.5339039144336
        y: 375.33506138785646
      positionAbsolute:
        x: 427.5339039144336
        y: 375.33506138785646
      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: DeepSeek-V3
          provider: langgenius/volcengine_maas/volcengine_maas
        prompt_template:
        - id: 616cdc32-7f55-4755-8c6f-e3c37bd4c3c1
          role: system
          text: '你是一位专业的语言学家，专门从事{{#1741876971157.text#}}到{{#1741863781270.target_language#}}的翻译编辑工作。


            你的任务是仔细阅读并编辑一个从{{#1741876971157.text#}}到{{#1741863781270.target_language#}}的翻译，同时考虑专家建议和建设性的批评。


            源文本、初始翻译和专家语言学家的建议分别用XML标签<SOURCE_STR></SOURCE_STR>、<TRANSLATION></TRANSLATION>和<EXPERT_SUGGESTIONS></EXPERT_SUGGESTIONS>标记如下：


            <SOURCE_STR>

            {{#1741863781270.source_str#}}

            </SOURCE_STR>


            <TRANSLATION>

            {{#1741864528014.text#}}

            </TRANSLATION>


            <EXPERT_SUGGESTIONS>

            {{#1741878523112.output#}}

            </EXPERT_SUGGESTIONS>


            请在编辑翻译时考虑专家建议。编辑翻译时请确保：

            (i) 准确性（通过纠正添加错误、误译、遗漏或未翻译的文本）

            (ii) 流畅性（通过应用{{#1741863781270.target_language#}}的语法、拼写和标点规则，确保没有不必要的重复）

            (iii) 风格（通过确保翻译反映源文本的风格）

            (iv) 术语（不适合上下文的术语、使用不一致）

            (v) 其他错误


            输出：

            ## 返回格式

            {{#1741876971157.text#}}: {{#1741863781270.source_str#}}

            {{#1741863781270.target_language#}}:'
        selected: false
        title: 优化翻译LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 90
      id: '1741878566278'
      position:
        x: 355.62351786000943
        y: 193.74893371877687
      positionAbsolute:
        x: 355.62351786000943
        y: 193.74893371877687
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 1464.3259728283072
      y: 138.18310636550723
      zoom: 1.1906166379932108
