Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include branch node stream output not working #9852

Closed
5 tasks done
majian159 opened this issue Oct 25, 2024 · 3 comments · Fixed by #9875
Closed
5 tasks done

Include branch node stream output not working #9852

majian159 opened this issue Oct 25, 2024 · 3 comments · Fixed by #9875
Assignees
Labels
🌊 feat:workflow Workflow related stuff.

Comments

@majian159
Copy link
Contributor

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10.1

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

DSL:

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: Dify 多分支流式bug
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
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
      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: llm
        targetType: answer
      id: 1729824788897-source-1729824802941-target
      selected: false
      source: '1729824788897'
      sourceHandle: source
      target: '1729824802941'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: if-else
      id: 1729820644004-source-1729825752321-target
      source: '1729820644004'
      sourceHandle: source
      target: '1729825752321'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: template-transform
      id: 1729825752321-false-1729824706299-target
      source: '1729825752321'
      sourceHandle: 'false'
      target: '1729824706299'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: template-transform
      id: 1729825752321-true-1729825876844-target
      source: '1729825752321'
      sourceHandle: 'true'
      target: '1729825876844'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: llm
      id: 1729824706299-source-1729824788897-target
      source: '1729824706299'
      sourceHandle: source
      target: '1729824788897'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: llm
      id: 1729825876844-source-1729824788897-target
      source: '1729825876844'
      sourceHandle: source
      target: '1729824788897'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables: []
      height: 52
      id: '1729820644004'
      position:
        x: 30
        y: 268
      positionAbsolute:
        x: 30
        y: 268
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        desc: ''
        selected: false
        template: '{{ 1 }}'
        title: 模板转换
        type: template-transform
        variables: []
      height: 52
      id: '1729824706299'
      position:
        x: 636
        y: 268
      positionAbsolute:
        x: 636
        y: 268
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 5f49010b-fd39-4da0-835f-2e1e0fd00d6e
          role: system
          text: 回答问题
        - id: a93f129e-e36d-4152-a25f-2f48e8d71f98
          role: user
          text: '{{#sys.query#}}'
        selected: false
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 96
      id: '1729824788897'
      position:
        x: 1242
        y: 268
      positionAbsolute:
        x: 1242
        y: 268
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        answer: '{{#1729824788897.text#}}'
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 101
      id: '1729824802941'
      position:
        x: 1545
        y: 268
      positionAbsolute:
        x: 1545
        y: 268
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: empty
            id: daac28d1-868a-4bfc-86d5-514fb7800558
            value: ''
            varType: string
            variable_selector:
            - sys
            - query
          id: 'true'
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 124
      id: '1729825752321'
      position:
        x: 333
        y: 268
      positionAbsolute:
        x: 333
        y: 268
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    - data:
        desc: ''
        selected: false
        template: '{{ 2 }}'
        title: 模板转换 2
        type: template-transform
        variables: []
      height: 52
      id: '1729825876844'
      position:
        x: 636
        y: 360
      positionAbsolute:
        x: 636
        y: 360
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 243
    viewport:
      x: -66.99612827501005
      y: 97.09133860246311
      zoom: 0.7712872040412053

✔️ Expected Behavior

stream output

❌ Actual Behavior

block output

@dosubot dosubot bot added the 🌊 feat:workflow Workflow related stuff. label Oct 25, 2024
Copy link

dosubot bot commented Oct 25, 2024

The issue you're experiencing with the 'stream output' not working and instead getting a 'block output' in Dify's workflow execution is likely related to the configuration of the response_mode parameter. To achieve a streaming output, ensure that the response_mode is set to streaming in your workflow configuration. If it's set to blocking, the output will be returned only after the execution is complete, which is the behavior you're currently observing [1][2].

Check your workflow configuration to ensure that the response_mode is correctly set to streaming where applicable. This should enable the expected stream output behavior.

To continue talking to Dosu, mention @dosu.

@majestichou
Copy link

I had the same problem.

The following application cannot be streamed.

app:
  description: 可以上传文件
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: 智慧助手
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
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
      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
        sourceType: document-extractor
        targetType: template-transform
      id: 1729843092297-source-1729843328778-target
      selected: false
      source: '1729843092297'
      sourceHandle: source
      target: '1729843328778'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: document-extractor
        targetType: template-transform
      id: 1729843115115-source-1729843328778-target
      selected: false
      source: '1729843115115'
      sourceHandle: source
      target: '1729843328778'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: if-else
      id: 1729842673275-source-1729844738033-target
      selected: false
      source: '1729842673275'
      sourceHandle: source
      target: '1729844738033'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: document-extractor
      id: 1729844738033-true-1729843092297-target
      selected: false
      source: '1729844738033'
      sourceHandle: 'true'
      target: '1729843092297'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: document-extractor
      id: 1729844738033-true-1729843115115-target
      selected: false
      source: '1729844738033'
      sourceHandle: 'true'
      target: '1729843115115'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: document-extractor
      id: 1729844738033-008de730-87fb-4072-b5cf-86f636663ccb-1729845065251-target
      selected: false
      source: '1729844738033'
      sourceHandle: 008de730-87fb-4072-b5cf-86f636663ccb
      target: '1729845065251'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: document-extractor
        targetType: template-transform
      id: 1729845065251-source-1729845094577-target
      selected: false
      source: '1729845065251'
      sourceHandle: source
      target: '1729845094577'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: document-extractor
      id: 1729844738033-50bd0784-4830-488c-8f16-c682d2a5645e-1729845705236-target
      source: '1729844738033'
      sourceHandle: 50bd0784-4830-488c-8f16-c682d2a5645e
      target: '1729845705236'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: document-extractor
        targetType: template-transform
      id: 1729845705236-source-1729845733274-target
      source: '1729845705236'
      sourceHandle: source
      target: '1729845733274'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: variable-aggregator
      id: 1729843328778-source-1729845777785-target
      source: '1729843328778'
      sourceHandle: source
      target: '1729845777785'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: variable-aggregator
      id: 1729845094577-source-1729845777785-target
      source: '1729845094577'
      sourceHandle: source
      target: '1729845777785'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: variable-aggregator
      id: 1729845733274-source-1729845777785-target
      source: '1729845733274'
      sourceHandle: source
      target: '1729845777785'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: variable-aggregator
        targetType: llm
      id: 1729845777785-source-1729846015934-target
      source: '1729845777785'
      sourceHandle: source
      target: '1729846015934'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1729846015934-source-1729846053694-target
      source: '1729846015934'
      sourceHandle: source
      target: '1729846053694'
      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
          label: 待上传文件1,支持常见文档格式
          max_length: 2
          options: []
          required: false
          type: file
          variable: First_File
        - allowed_file_extensions: []
          allowed_file_types:
          - document
          allowed_file_upload_methods:
          - local_file
          label: 待上传文件2,支持常见文档格式
          max_length: 48
          options: []
          required: false
          type: file
          variable: Second_File
      height: 116
      id: '1729842673275'
      position:
        x: -69
        y: 282
      positionAbsolute:
        x: -69
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_array_file: false
        selected: false
        title: 文档提取器
        type: document-extractor
        variable_selector:
        - '1729842673275'
        - First_File
      height: 94
      id: '1729843092297'
      position:
        x: 663
        y: 206
      positionAbsolute:
        x: 663
        y: 206
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_array_file: false
        selected: false
        title: 文档提取器 2
        type: document-extractor
        variable_selector:
        - '1729842673275'
        - Second_File
      height: 94
      id: '1729843115115'
      position:
        x: 663
        y: 313
      positionAbsolute:
        x: 663
        y: 313
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: "{% set result = \"\" %}\r\n{% if arg2|length > 0 %}\r\n    {% set\
          \ result = result ~ \"The content of the first document named \" ~ arg1\
          \ ~ \" is as follows\\n\" ~ arg2 %}\r\n{% endif %}\r\n{% if arg4|length\
          \ > 0 %}\r\n    {% set result = result ~ \"The content of the second document\
          \ named \" ~ arg3 ~ \" is as follows\\n\" ~ arg4 %}\r\n{% endif %}\r\n{{\
          \ result }}"
        title: 模板转换
        type: template-transform
        variables:
        - value_selector:
          - '1729842673275'
          - First_File
          - name
          variable: arg1
        - value_selector:
          - '1729843092297'
          - text
          variable: arg2
        - value_selector:
          - '1729842673275'
          - Second_File
          - name
          variable: arg3
        - value_selector:
          - '1729843115115'
          - text
          variable: arg4
      height: 54
      id: '1729843328778'
      position:
        x: 973
        y: 211
      positionAbsolute:
        x: 973
        y: 211
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: exists
            id: a5b55bcd-041f-4cd5-b7d7-b773ec4c01bd
            value: ''
            varType: file
            variable_selector:
            - '1729842673275'
            - First_File
          - comparison_operator: exists
            id: b64e5b93-e6f3-4e37-9cc8-c4ce65dad0f5
            value: ''
            varType: file
            variable_selector:
            - '1729842673275'
            - Second_File
          id: 'true'
          logical_operator: and
        - case_id: 008de730-87fb-4072-b5cf-86f636663ccb
          conditions:
          - comparison_operator: exists
            id: 7ffea84f-4bd1-400e-947c-cf2fffb55e7e
            value: ''
            varType: file
            variable_selector:
            - '1729842673275'
            - First_File
          id: 008de730-87fb-4072-b5cf-86f636663ccb
          logical_operator: and
        - case_id: 50bd0784-4830-488c-8f16-c682d2a5645e
          conditions:
          - comparison_operator: exists
            id: 7ed330af-b1f9-4fe3-a681-ba17d604e2bf
            value: ''
            varType: file
            variable_selector:
            - '1729842673275'
            - Second_File
          id: 50bd0784-4830-488c-8f16-c682d2a5645e
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 248
      id: '1729844738033'
      position:
        x: 205
        y: 282
      positionAbsolute:
        x: 205
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_array_file: false
        selected: false
        title: 文档提取器 3
        type: document-extractor
        variable_selector:
        - '1729842673275'
        - First_File
      height: 94
      id: '1729845065251'
      position:
        x: 663
        y: 441
      positionAbsolute:
        x: 663
        y: 441
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: "{% set result = \"\" %}\r\n{% if arg2|length > 0 %}\r\n    {% set\
          \ result = result ~ \"The content of the document named \" ~ arg1 ~ \" is\
          \ as follows\\n\" ~ arg2 %}\r\n{% endif %}\r\n{{ result }}"
        title: 模板转换 2
        type: template-transform
        variables:
        - value_selector:
          - '1729842673275'
          - First_File
          - name
          variable: arg1
        - value_selector:
          - '1729845065251'
          - text
          variable: arg2
      height: 54
      id: '1729845094577'
      position:
        x: 967
        y: 446
      positionAbsolute:
        x: 967
        y: 446
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_array_file: false
        selected: false
        title: 文档提取器 4
        type: document-extractor
        variable_selector:
        - '1729842673275'
        - Second_File
      height: 94
      id: '1729845705236'
      position:
        x: 663
        y: 574
      positionAbsolute:
        x: 663
        y: 574
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: "{% set result = \"\" %}\r\n{% if arg2|length > 0 %}\r\n    {% set\
          \ result = result ~ \"The content of the document named \" ~ arg1 ~ \" is\
          \ as follows\\n\" ~ arg2 %}\r\n{% endif %}\r\n{{ result }}"
        title: 模板转换 3
        type: template-transform
        variables:
        - value_selector:
          - '1729842673275'
          - Second_File
          - name
          variable: arg1
        - value_selector:
          - '1729845705236'
          - text
          variable: arg2
      height: 54
      id: '1729845733274'
      position:
        x: 967
        y: 574
      positionAbsolute:
        x: 967
        y: 574
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        advanced_settings:
          group_enabled: false
          groups:
          - groupId: 6828dae5-06bc-4a44-b6f0-2e4b4df99123
            group_name: Group1
            output_type: string
            variables:
            - - '1729843328778'
              - output
        desc: ''
        output_type: string
        selected: false
        title: 变量聚合器
        type: variable-aggregator
        variables:
        - - '1729843328778'
          - output
        - - '1729845094577'
          - output
        - - '1729845733274'
          - output
      height: 164
      id: '1729845777785'
      position:
        x: 1267
        y: 211
      positionAbsolute:
        x: 1267
        y: 211
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          query_prompt_template: '{{#1729845777785.output#}}

            The user''s question is as follows:

            {{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 50
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: /data/models/Qwen2.5-72B-Instruct
          provider: openai_api_compatible
        prompt_template:
        - id: cdbb24ae-3e13-4eed-8996-4ddd18f97d47
          role: system
          text: You are a document reader, and your job is to read the document and
            answer the user's questions.
        selected: false
        title: 'LLM '
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1729846015934'
      position:
        x: 1583
        y: 211
      positionAbsolute:
        x: 1583
        y: 211
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1729846015934.text#}}'
        desc: ''
        selected: false
        title: 直接回复 2
        type: answer
        variables: []
      height: 103
      id: '1729846053694'
      position:
        x: 1880
        y: 211
      positionAbsolute:
        x: 1880
        y: 211
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 317.3556163336482
      y: 175.1570262150313
      zoom: 0.5743491774985174

The file upload Q&A application implemented in another way does not have this problem and can be streamed normally.

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: File Reader(采用sys.files变量和会话变量保留记忆)
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
  conversation_variables:
  - description: 文件的内容
    id: 0426d7ce-882d-40ed-91a8-5f24aaec1340
    name: file_content
    value: ''
    value_type: string
  environment_variables: []
  features:
    file_upload:
      allowed_file_extensions:
      - .JPG
      - .JPEG
      - .PNG
      - .GIF
      - .WEBP
      - .SVG
      allowed_file_types:
      - document
      allowed_file_upload_methods:
      - local_file
      enabled: true
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
      number_limits: 2
    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
        sourceType: start
        targetType: document-extractor
      id: 1729783247377-source-1729783260965-target
      selected: false
      source: '1729783247377'
      sourceHandle: source
      target: '1729783260965'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1729837195182-source-1729837231935-target
      selected: false
      source: '1729837195182'
      sourceHandle: source
      target: '1729837231935'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: assigner
      id: 1729838703288-source-1729839488132-target
      selected: false
      source: '1729838703288'
      sourceHandle: source
      target: '1729839488132'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: assigner
        targetType: llm
      id: 1729839488132-source-1729837195182-target
      selected: false
      source: '1729839488132'
      sourceHandle: source
      target: '1729837195182'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: template-transform
      id: 1729839688163-true-1729838703288-target
      selected: false
      source: '1729839688163'
      sourceHandle: 'true'
      target: '1729838703288'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1729839688163-false-1729839902315-target
      source: '1729839688163'
      sourceHandle: 'false'
      target: '1729839902315'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: 1729839902315-source-1729839994258-target
      source: '1729839902315'
      sourceHandle: source
      target: '1729839994258'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: document-extractor
        targetType: if-else
      id: 1729783260965-source-1729839688163-target
      source: '1729783260965'
      sourceHandle: source
      target: '1729839688163'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: Start
        type: start
        variables: []
      height: 54
      id: '1729783247377'
      position:
        x: 80
        y: 282
      positionAbsolute:
        x: 80
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        is_array_file: true
        selected: false
        title: Doc Extractor
        type: document-extractor
        variable_selector:
        - sys
        - files
      height: 94
      id: '1729783260965'
      position:
        x: 533.0873732175502
        y: 282
      positionAbsolute:
        x: 533.0873732175502
        y: 282
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: /data/models/Qwen2.5-72B-Instruct
          provider: openai_api_compatible
        prompt_template:
        - id: fed4af41-5472-49e8-b98b-89514248746d
          role: system
          text: You are a document reader, and your job is to read the document and
            answer the user's questions.
        - id: 5366c7f5-d86d-4f9d-bc45-58575b9a2dd0
          role: user
          text: 'The document is as follows:

            {{#conversation.file_content#}}

            The user''s question is as follow:

            {{#sys.query#}}'
        selected: false
        title: LLM 1
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1729837195182'
      position:
        x: 1843
        y: 282
      positionAbsolute:
        x: 1843
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1729837195182.text#}}'
        desc: ''
        selected: false
        title: 直接回复 1
        type: answer
        variables: []
      height: 103
      id: '1729837231935'
      position:
        x: 2197
        y: 282
      positionAbsolute:
        x: 2197
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: "{% set result = \"\" %}\r\n{% set result = result ~ \"The first\
          \ document is as follows\\n\" ~ my_list[0] %}\r\n{% if my_list|length >\
          \ 1 %}\r\n    {% set result = result ~ \"The second document is as follows\\\
          n\" ~ my_list[1] %}\r\n{% endif %}\r\n{{ result }}"
        title: 模板转换
        type: template-transform
        variables:
        - value_selector:
          - '1729783260965'
          - text
          variable: my_list
      height: 54
      id: '1729838703288'
      position:
        x: 1275
        y: 314
      positionAbsolute:
        x: 1275
        y: 314
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        assigned_variable_selector:
        - conversation
        - file_content
        desc: ''
        input_variable_selector:
        - '1729838703288'
        - output
        selected: false
        title: 变量赋值
        type: assigner
        write_mode: over-write
      height: 132
      id: '1729839488132'
      position:
        x: 1562
        y: 282
      positionAbsolute:
        x: 1562
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: not empty
            id: 21a8d494-448a-4df0-b15c-bd8694687855
            value: ''
            varType: array[string]
            variable_selector:
            - '1729783260965'
            - text
          id: 'true'
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 126
      id: '1729839688163'
      position:
        x: 979
        y: 282
      positionAbsolute:
        x: 979
        y: 282
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          query_prompt_template: 'The document is as follows:

            {{#conversation.file_content#}}

            The user''s question is as follow:

            {{#sys.query#}}'
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 50
        model:
          completion_params:
            max_tokens: 4096
            temperature: 0.7
            top_p: 0.8
          mode: chat
          name: /data/models/Qwen2.5-72B-Instruct
          provider: openai_api_compatible
        prompt_template:
        - id: 3fb5f73d-8804-44c3-b6cb-57ab45ab452f
          role: system
          text: You are a document reader, and your job is to read the document and
            answer the user's questions.
        selected: false
        title: LLM 2
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1729839902315'
      position:
        x: 1275
        y: 405.4842834334896
      positionAbsolute:
        x: 1275
        y: 405.4842834334896
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#1729839902315.text#}}'
        desc: ''
        selected: false
        title: 直接回复 2
        type: answer
        variables: []
      height: 103
      id: '1729839994258'
      position:
        x: 1577
        y: 460
      positionAbsolute:
        x: 1577
        y: 460
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -797.9694225411711
      y: 228.47205587861987
      zoom: 0.6597539553864472

@Hisir0909
Copy link
Contributor

It seems to have reappeared in 0.14.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants