🤖

全书翻译

暂无描述

⬡ 13 节点 ↓ 9 下载 ⚙ workflow ⭐ 85/100 2026-05-28

工作流图谱

YAML 源码

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: 全书翻译
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    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: start
        targetType: code
      id: 1711067409646-source-1717916867969-target
      source: '1711067409646'
      sourceHandle: source
      target: '1717916867969'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: code
        targetType: iteration
      id: 1717916867969-source-1717916955547-target
      source: '1717916867969'
      sourceHandle: source
      target: '1717916955547'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: true
        iteration_id: '1717916955547'
        sourceType: llm
        targetType: llm
      id: 1717916961837-source-1717916977413-target
      source: '1717916961837'
      sourceHandle: source
      target: '1717916977413'
      targetHandle: target
      type: custom
      zIndex: 1002
    - data:
        isInIteration: true
        iteration_id: '1717916955547'
        sourceType: llm
        targetType: llm
      id: 1717916977413-source-1717916984996-target
      source: '1717916977413'
      sourceHandle: source
      target: '1717916984996'
      targetHandle: target
      type: custom
      zIndex: 1002
    - data:
        isInIteration: true
        iteration_id: '1717916955547'
        sourceType: llm
        targetType: llm
      id: 1717916984996-source-1717916991709-target
      source: '1717916984996'
      sourceHandle: source
      target: '1717916991709'
      targetHandle: target
      type: custom
      zIndex: 1002
    - data:
        isInIteration: false
        sourceType: iteration
        targetType: template-transform
      id: 1717916955547-source-1717917057450-target
      source: '1717916955547'
      sourceHandle: source
      target: '1717917057450'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: end
      id: 1717917057450-source-1711068257370-target
      source: '1717917057450'
      sourceHandle: source
      target: '1711068257370'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: true
        iteration_id: '1717916955547'
        sourceType: iteration-start
        targetType: llm
      id: 1717916955547start0-source-1717916961837-target
      source: 1717916955547start0
      sourceHandle: source
      target: '1717916961837'
      targetHandle: target
      type: custom
      zIndex: 1002
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: 输入文本
          max_length: null
          options: []
          required: true
          type: paragraph
          variable: input_text
      dragging: false
      height: 90
      id: '1711067409646'
      position:
        x: 30
        y: 301.5
      positionAbsolute:
        x: 30
        y: 301.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1717917057450'
          - output
          variable: final
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1711068257370'
      position:
        x: 2289.851301645003
        y: 301.5
      positionAbsolute:
        x: 2289.851301645003
        y: 301.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        code: "\ndef main(input_text: str) -> str:\n    token_limit = 1000\n    overlap\
          \ = 100\n    chunk_size = int(token_limit * 6 * (4/3))\n\n        # Initialize\
          \ variables\n    chunks = []\n    start_index = 0\n    text_length = len(input_text)\n\
          \n    # Loop until the end of the text is reached\n    while start_index\
          \ < text_length:\n        # If we are not at the beginning, adjust the start_index\
          \ to ensure overlap\n        if start_index > 0:\n            start_index\
          \ -= overlap\n\n        # Calculate end index for the current chunk\n  \
          \      end_index = start_index + chunk_size\n        if end_index > text_length:\n\
          \            end_index = text_length\n\n        # Add the current chunk\
          \ to the list\n        chunks.append(input_text[start_index:end_index])\n\
          \n        # Update the start_index for the next chunk\n        start_index\
          \ += chunk_size\n\n    return {\n        \"chunks\": chunks,\n    }\n"
        code_language: python3
        dependencies: []
        desc: 'token_limit = 1000

          overlap = 100'
        outputs:
          chunks:
            children: null
            type: array[string]
        selected: true
        title: 代码执行
        type: code
        variables:
        - value_selector:
          - '1711067409646'
          - input_text
          variable: input_text
      height: 98
      id: '1717916867969'
      position:
        x: 336
        y: 301.5
      positionAbsolute:
        x: 336
        y: 301.5
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        height: 203
        iterator_selector:
        - '1717916867969'
        - chunks
        output_selector:
        - '1717916991709'
        - text
        output_type: array[string]
        selected: false
        startNodeType: llm
        start_node_id: 1717916955547start0
        title: 迭代
        type: iteration
        width: 1289
      height: 203
      id: '1717916955547'
      position:
        x: 638
        y: 301.5
      positionAbsolute:
        x: 638
        y: 301.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 1289
      zIndex: 1
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        isInIteration: true
        isIterationStart: true
        iteration_id: '1717916955547'
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 7261280b-cb27-4f84-8363-b93e09246d16
          role: system
          text: "<任务> 识别用户输入的技术术语。请用示例中的格式展示翻译前后的技术术语对应关系。\n\n<输入文本> \n{{#1717916955547.item#}}\n\
            \n<示例>\n| 英文 | 中文 |\n| --- | --- |\n| Prompt Engineering | 提示词工程 |\n|\
            \ Text Generation  | 文本生成 |\n| Token  | Token |\n| Prompt  | 提示词 |\n|\
            \ Meta Prompting  | 元提示 |\n| diffusion models  | 扩散模型 |\n| Agent  | 智能体\
            \ |\n| Transformer  | Transformer |\n| Zero Shot  | 零样本 |\n| Few Shot\
            \  | 少样本 |\n| chat window  | 聊天 |\n| context | 上下文 |\n| stock photo  |\
            \ 图库照片 |\n\n\n<Technical Terms> "
        selected: false
        title: 识别专有名词
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      extent: parent
      height: 98
      id: '1717916961837'
      parentId: '1717916955547'
      position:
        x: 117
        y: 85
      positionAbsolute:
        x: 755
        y: 386.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
      zIndex: 1001
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        isInIteration: true
        iteration_id: '1717916955547'
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 05e03f0d-c1a9-43ab-b4c0-44b55049434d
          role: system
          text: "<任务> 您是一名精通简体中文的专业译者,特别是在将专业的学术论文转换为通俗易懂的科普文章方面有着非凡的能力。请协助我把下面的英文段落翻译成中文,使其风格与中文的科普文章相似。\n\
            <限制> \n请根据英文内容直接翻译,维持原有的格式,不省略任何信息。\n<翻译前的原文> \n{{#1717916955547.item#}}\n\
            <专有名词>\n{{#1717916961837.text#}}\n<直接翻译> "
        selected: false
        title: 直接翻译
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      extent: parent
      height: 98
      id: '1717916977413'
      parentId: '1717916955547'
      position:
        x: 421
        y: 85
      positionAbsolute:
        x: 1059
        y: 386.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
      zIndex: 1002
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        isInIteration: true
        iteration_id: '1717916955547'
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 9e6cc050-465e-4632-abc9-411acb255a95
          role: system
          text: '<任务>

            根据直接翻译的结果,指出其具体存在的问题。需要提供精确描述,避免含糊其辞,并且无需增添原文中未包含的内容或格式。具体包括但不限于:

            不符合中文的表达习惯,请明确指出哪里不合适句子结构笨拙,请指出具体位置,无需提供修改建议,我们将在后续的自由翻译中进行调整表达含糊不清,难以理解,如果可能,可以试图进行解释

            - 关于⼈名的翻译。技术图书中...(过长已截断)