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

IF ELSE can cause the Stream output of LLM nodes to fail. #12068

Closed
5 tasks done
Hisir0909 opened this issue Dec 25, 2024 · 24 comments
Closed
5 tasks done

IF ELSE can cause the Stream output of LLM nodes to fail. #12068

Hisir0909 opened this issue Dec 25, 2024 · 24 comments

Comments

@Hisir0909
Copy link
Contributor

Hisir0909 commented Dec 25, 2024

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.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

MyDSL
app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: test bug - 2
  use_icon_as_answer_icon: false
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: 50
        batch_count_limit: 5
        file_size_limit: 15
        image_file_size_limit: 10
        video_file_size_limit: 100
        workflow_file_upload_limit: 100
      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: start
        targetType: if-else
      id: 1732074063800-source-1735117839833-target
      source: '1732074063800'
      sourceHandle: source
      target: '1735117839833'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: template-transform
      id: 1735117839833-false-1735117849369-target
      source: '1735117839833'
      sourceHandle: 'false'
      target: '1735117849369'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1735117839833-true-1735117865507-target
      source: '1735117839833'
      sourceHandle: 'true'
      target: '1735117865507'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: llm
      id: 1735117849369-source-1735117865507-target
      source: '1735117849369'
      sourceHandle: source
      target: '1735117865507'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1735117865507-source-1735117893818-target
      source: '1735117865507'
      sourceHandle: source
      target: '1735117893818'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: 'no'
          max_length: 48
          options: []
          required: false
          type: text-input
          variable: 'no'
      height: 90
      id: '1732074063800'
      position:
        x: -238.62769206536882
        y: 2.993474134493738
      positionAbsolute:
        x: -238.62769206536882
        y: 2.993474134493738
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: contains
            id: 7be3a434-2c39-4624-89d5-3d43457f36f4
            value: '1'
            varType: string
            variable_selector:
            - '1732074063800'
            - 'no'
          id: 'true'
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 126
      id: '1735117839833'
      position:
        x: -238.62769206536882
        y: 115.96771110887573
      positionAbsolute:
        x: -238.62769206536882
        y: 115.96771110887573
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '111'
        title: 模板转换
        type: template-transform
        variables: []
      height: 54
      id: '1735117849369'
      position:
        x: -48.90588360673496
        y: 273.43506428265556
      positionAbsolute:
        x: -48.90588360673496
        y: 273.43506428265556
      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: yi-lightning
          provider: yi
        prompt_template:
        - id: d6c7a9f6-f4d9-4bbf-ac19-6729a6e5b5a7
          role: system
          text: 翻译用户输入 从中文到英文
        - id: 5600c75b-4896-4f1b-94cf-cad5c053de39
          role: user
          text: '苹果iPhone 17 Pro屏幕渲染图曝光:灵动岛或缩小


            目前已有多方消息源确认,苹果将在iPhone 17 Pro系列上使用Metalens技术缩小Face ID模组,从而减小灵动岛的开孔。爆料者根据信息制作了iPhone
            17 Pro的屏幕渲染图,其灵动岛面积相较目前的iPhone 16 Pro系列要小很多。这也是iPhone 14 Pro用上灵动岛后,首次对正面做出较大的改变。


            来源:格隆汇'
        selected: false
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1735117865507'
      position:
        x: 198.78731092044814
        y: 115.96771110887573
      positionAbsolute:
        x: 198.78731092044814
        y: 115.96771110887573
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1735117865507'
          - text
          variable: text
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1735117893818'
      position:
        x: 474.89243759344015
        y: 115.96771110887573
      positionAbsolute:
        x: 474.89243759344015
        y: 115.96771110887573
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 454.04147830596025
      y: 252.08975294716515
      zoom: 0.716977624007919

✔️ Expected Behavior

Stream output

❌ Actual Behavior

Stream failed

Copy link

dosubot bot commented Dec 25, 2024

The issue you're experiencing with the stream output failure in LLM nodes when using a variable aggregator might be related to the requirement that the variable aggregator can only aggregate variables of the same data type. If the first variable added to the aggregator is of a certain type, all subsequent variables must match this type. This restriction could lead to issues if there is a mismatch in data types among the variables being aggregated [1].

To troubleshoot this, ensure that all variables being aggregated are of the same data type. If the problem persists, check for any specific error messages or logs that might provide more insight into the failure. Additionally, verify that the variable aggregator is correctly configured to handle the data types involved in your workflow.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@SingleKey
Copy link

After I removed the variable aggregator, the output is still blocking rather than streaming. Could you please guide me on how to modify the yml file to resolve this issue?

@yihong0618
Copy link
Contributor

can you share your dsl?
thanks

@Hisir0909
Copy link
Contributor Author

can you share your dsl?能否共享您的服务器? thanks  谢谢

in Steps to reproduce

@Hisir0909
Copy link
Contributor Author

After I removed the variable aggregator, the output is still blocking rather than streaming. Could you please guide me on how to modify the yml file to resolve this issue?

Oh, it seems the issue is not caused by the variable aggregator, but rather by the IF ELSE statement.

@yihong0618
Copy link
Contributor

it worked in my env
image

@Hisir0909
Copy link
Contributor Author

Hisir0909 commented Dec 25, 2024

it worked in my env image

This is my:

_20241225_165622.webm

@Hisir0909 Hisir0909 changed the title Using a variable aggregator in special cases can cause the Stream output of LLM nodes to fail. IF ELSE can cause the Stream output of LLM nodes to fail. Dec 25, 2024
@yihong0618
Copy link
Contributor

it worked in my env image

This is my: 屏幕录像_20241225_165622.webm

do we have the same dsl it seems different

@lssmlssm
Copy link

Include branch node stream output not working #9852

@Hisir0909
Copy link
Contributor Author

Hisir0909 commented Dec 25, 2024

it worked in my env image

This is my: 屏幕录像_20241225_165622.webm

do we have the same dsl it seems different

The DSL I tested for another person also has the issue that the LLM stream output fails after the IF node.
#9852

@laipz8200
Copy link
Member

it worked in my env image

This is my:
_20241225_165622.webm

If trying to merge several branches into one, you should use the Variable Aggregator Node.

@Hisir0909
Copy link
Contributor Author

Hisir0909 commented Dec 25, 2024

it worked in my env image

This is my:
_20241225_165622.webm

If trying to merge several branches into one, you should use the Variable Aggregator Node.

The problem is the same; it's not caused by not using variable aggregation.

_20241225_180756.mp4

@lssmlssm
Copy link

image
It looks like the old problem from before has resurfaced again...

yihong0618 added a commit to yihong0618/dify that referenced this issue Dec 26, 2024
@yihong0618
Copy link
Contributor

#12105

@yihong0618
Copy link
Contributor

image It looks like the old problem from before has resurfaced again...

fixed

laipz8200 pushed a commit that referenced this issue Dec 26, 2024
@khoi03
Copy link

khoi03 commented Jan 4, 2025

This bug was marked as fixed. However, I just ran into a similar issue when I added an If-Else node before the LLM node.

@Hisir0909
Copy link
Contributor Author

This bug was marked as fixed. However, I just ran into a similar issue when I added an If-Else node before the LLM node.

Yes, 0.14.2 does not have this fix yet.

@yihong0618
Copy link
Contributor

This bug was marked as fixed. However, I just ran into a similar issue when I added an If-Else node before the LLM node.

Yes, 0.14.2 does not have this fix yet.

can you help about that? I think there still other case about this.

@k99k5
Copy link

k99k5 commented Jan 6, 2025

This bug was marked as fixed. However, I just ran into a similar issue when I added an If-Else node before the LLM node.

Yes, 0.14.2 does not have this fix yet.

can you help about that? I think there still other case about this.

I also encountered a similar issue .

my dsl


app:
  description: ''
  icon: 🤗
  icon_background: '#FFEAD5'
  mode: workflow
  name: demo
  use_icon_as_answer_icon: true
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: 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: knowledge-retrieval
        targetType: llm
      id: 1711528770201-source-17359813911380-target
      selected: false
      source: '1711528770201'
      sourceHandle: source
      target: '17359813911380'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 17359813911380-source-1735984496098-target
      selected: false
      source: '17359813911380'
      sourceHandle: source
      target: '1735984496098'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1735981165052-source-1735984507120-target
      selected: false
      source: '1735981165052'
      sourceHandle: source
      target: '1735984507120'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1735988194396-source-1735988283325-target
      selected: false
      source: '1735988194396'
      sourceHandle: source
      target: '1735988283325'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: question-classifier
      id: 1711528708197-source-1735989494631-target
      source: '1711528708197'
      sourceHandle: source
      target: '1735989494631'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: knowledge-retrieval
        targetType: llm
      id: 1711528768556-source-1735981165052-target
      source: '1711528768556'
      sourceHandle: source
      target: '1735981165052'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: question-classifier
      id: 1711528708197-source-1711528709608-target
      source: '1711528708197'
      sourceHandle: source
      target: '1711528709608'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: knowledge-retrieval
      id: 1735989855659-true-1711528768556-target
      source: '1735989855659'
      sourceHandle: 'true'
      target: '1711528768556'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: knowledge-retrieval
      id: 1735989855659-158fbc3f-313f-4f5c-8dea-54518e87e7c4-1711528770201-target
      source: '1735989855659'
      sourceHandle: 158fbc3f-313f-4f5c-8dea-54518e87e7c4
      target: '1711528770201'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: knowledge-retrieval
      id: 1735989855659-39c9ad79-e6a1-458e-a933-8159cfbdcc22-1711528770201-target
      source: '1735989855659'
      sourceHandle: 39c9ad79-e6a1-458e-a933-8159cfbdcc22
      target: '1711528770201'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: if-else
        targetType: llm
      id: 1735989855659-false-1735988194396-target
      source: '1735989855659'
      sourceHandle: 'false'
      target: '1735988194396'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1735989494631-1-1735991188016-target
      source: '1735989494631'
      sourceHandle: '1'
      target: '1735991188016'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1735989494631-2-1735991188016-target
      source: '1735989494631'
      sourceHandle: '2'
      target: '1735991188016'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1735989494631-1735989524789-1735991188016-target
      source: '1735989494631'
      sourceHandle: '1735989524789'
      target: '1735991188016'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: variable-aggregator
        targetType: variable-aggregator
      id: 1735991188016-source-1735991200886-target
      source: '1735991188016'
      sourceHandle: source
      target: '1735991200886'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1711528709608-1711528736036-1735991266308-target
      source: '1711528709608'
      sourceHandle: '1711528736036'
      target: '1735991266308'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: variable-aggregator
        targetType: variable-aggregator
      id: 1735991266308-source-1735991200886-target
      source: '1735991266308'
      sourceHandle: source
      target: '1735991200886'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1711528709608-1711528736549-1735991266308-target
      source: '1711528709608'
      sourceHandle: '1711528736549'
      target: '1735991266308'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1711528709608-1711528737066-1735991266308-target
      source: '1711528709608'
      sourceHandle: '1711528737066'
      target: '1735991266308'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1711528709608-1735987366072-1735991266308-target
      source: '1711528709608'
      sourceHandle: '1735987366072'
      target: '1735991266308'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: variable-aggregator
        targetType: if-else
      id: 1735991200886-source-1735989855659-target
      source: '1735991200886'
      sourceHandle: source
      target: '1735989855659'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1735989494631-1735991966319-1735991188016-target
      source: '1735989494631'
      sourceHandle: '1735991966319'
      target: '1735991188016'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: question-classifier
        targetType: variable-aggregator
      id: 1711528709608-1736000771051-1735991266308-target
      source: '1711528709608'
      sourceHandle: '1736000771051'
      target: '1735991266308'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: 查询内容
          max_length: 48
          options: []
          required: true
          type: text-input
          variable: query
      height: 90
      id: '1711528708197'
      position:
        x: 30
        y: 323.5
      positionAbsolute:
        x: 30
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        classes:
        - id: '1711528736036'
          name: 销售相关问题
        - id: '1711528736549'
          name: 使用问题
        - id: '1711528737066'
          name: 其他问题
        - id: '1735987366072'
          name: 支付相关问题
        - id: '1736000771051'
          name: 支持语言
        desc: ''
        instructions: ''
        model:
          completion_params:
            frequency_penalty: 0
            max_tokens: 512
            presence_penalty: 0
            temperature: 0
            top_p: 0.1
          mode: chat
          name: Qwen/Qwen2.5-7B-Instruct
          provider: siliconflow
        query_variable_selector:
        - '1711528708197'
        - query
        selected: false
        title: 问题分类器
        topics: []
        type: question-classifier
        vision:
          enabled: false
      height: 284
      id: '1711528709608'
      position:
        x: 333
        y: 610.5
      positionAbsolute:
        x: 333
        y: 610.5
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        dataset_ids:
        - 6084ed3f-d100-4df2-a277-b40d639ea7c6
        - 0e6a8774-3341-4643-a185-cf38bedfd7fe
        - db8cdf93-c34b-4dd1-b68e-bdf7e39eec1b
        desc: 销售问题
        multiple_retrieval_config:
          reranking_enable: true
          reranking_mode: reranking_model
          reranking_model:
            model: netease-youdao/bce-reranker-base_v1
            provider: siliconflow
          score_threshold: null
          top_k: 2
        query_variable_selector:
        - '1711528708197'
        - query
        retrieval_mode: multiple
        selected: false
        single_retrieval_config:
          model:
            completion_params: {}
            mode: chat
            name: gpt-3.5-turbo
            provider: openai
        title: 知识检索
        type: knowledge-retrieval
      dragging: false
      height: 120
      id: '1711528768556'
      position:
        x: 1545
        y: 323.5
      positionAbsolute:
        x: 1545
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        dataset_ids:
        - 6084ed3f-d100-4df2-a277-b40d639ea7c6
        - 9a3d1ad0-80a1-4924-9ed4-b4b4713a2feb
        - db8cdf93-c34b-4dd1-b68e-bdf7e39eec1b
        desc: 使用问题
        multiple_retrieval_config:
          reranking_enable: true
          reranking_mode: reranking_model
          reranking_model:
            model: netease-youdao/bce-reranker-base_v1
            provider: siliconflow
          score_threshold: null
          top_k: 2
        query_variable_selector:
        - '1711528708197'
        - query
        retrieval_mode: multiple
        selected: false
        single_retrieval_config:
          model:
            completion_params: {}
            mode: chat
            name: gpt-3.5-turbo
            provider: openai
        title: 知识检索
        type: knowledge-retrieval
      dragging: false
      height: 120
      id: '1711528770201'
      position:
        x: 1545
        y: 482.5
      positionAbsolute:
        x: 1545
        y: 482.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: true
          variable_selector:
          - '1711528768556'
          - result
        desc: ''
        model:
          completion_params:
            frequency_penalty: 0
            max_tokens: 768
            temperature: 0
            top_p: 0.1
          mode: chat
          name: deepseek-chat
          provider: deepseek
        prompt_template:
        - id: cde0a87e-7929-4cb7-bee6-d0470fb23722
          role: system
          text: '<category>

            {{#1735991200886.category.output#}}

            </category>


            <knowledge_base>

            {{#context#}}

            </knowledge_base>


            <response_language>

            {{#1735991200886.lang.output#}}

            </response_language>'
        - id: 313c8228-da12-40fa-8686-995ee50c06d5
          role: user
          text: '{{#1711528708197.query#}}'
        selected: false
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1735981165052'
      position:
        x: 1848
        y: 323.5
      positionAbsolute:
        x: 1848
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: true
          variable_selector:
          - '1711528770201'
          - result
        desc: ''
        model:
          completion_params:
            frequency_penalty: 0
            max_tokens: 768
            temperature: 0
            top_p: 0.1
          mode: chat
          name: deepseek-chat
          provider: deepseek
        prompt_template:
        - id: cde0a87e-7929-4cb7-bee6-d0470fb23722
          role: system
          text: '

            <category>

            {{#1735991200886.category.output#}}

            </category>


            <knowledge_base>

            {{#context#}}

            </knowledge_base>


            <response_language>

            {{#1735991200886.lang.output#}}

            </response_language>'
        - id: 313c8228-da12-40fa-8686-995ee50c06d5
          role: user
          text: '{{#1711528708197.query#}}'
        selected: false
        title: LLM 2
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '17359813911380'
      position:
        x: 1848
        y: 482.5
      positionAbsolute:
        x: 1848
        y: 482.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '17359813911380'
          - text
          variable: answer
        selected: false
        title: 结束 2
        type: end
      height: 90
      id: '1735984496098'
      position:
        x: 2151
        y: 482.5
      positionAbsolute:
        x: 2151
        y: 482.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1735981165052'
          - text
          variable: answer
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1735984507120'
      position:
        x: 2151
        y: 323.5
      positionAbsolute:
        x: 2151
        y: 323.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: Qwen/Qwen2.5-7B-Instruct
          provider: siliconflow
        prompt_template:
        - id: 1b996200-75dd-4b23-9e93-bd989be02451
          role: system
          text: '

            <response_language>

            {{#1735991200886.lang.output#}}

            </response_language>'
        selected: false
        title: LLM 3
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: '1735988194396'
      position:
        x: 1545
        y: 641.5
      positionAbsolute:
        x: 1545
        y: 641.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1735988194396'
          - text
          variable: answer
        selected: false
        title: 结束 3
        type: end
      height: 90
      id: '1735988283325'
      position:
        x: 1848
        y: 634.5
      positionAbsolute:
        x: 1848
        y: 634.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        classes:
        - id: '1'
          name: English
        - id: '2'
          name: Chinese
        - id: '1735989524789'
          name: Japanese
        - id: '1735991966319'
          name: Other(User)
        desc: ''
        instructions: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: Qwen/Qwen2.5-7B-Instruct
          provider: siliconflow
        query_variable_selector:
        - '1711528708197'
        - query
        selected: false
        title: 语言分类器
        topics: []
        type: question-classifier
        vision:
          enabled: false
      height: 248
      id: '1735989494631'
      position:
        x: 333
        y: 323.5
      positionAbsolute:
        x: 333
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        cases:
        - case_id: 'true'
          conditions:
          - comparison_operator: is
            id: 4e4ccc91-24c5-47a0-b55b-22aeda0bf95b
            value: 销售相关问题
            varType: string
            variable_selector:
            - '1735991200886'
            - category
            - output
          id: 'true'
          logical_operator: and
        - case_id: 158fbc3f-313f-4f5c-8dea-54518e87e7c4
          conditions:
          - comparison_operator: is
            id: bc4ab430-806f-4218-a9a9-9c175da73216
            value: 使用问题
            varType: string
            variable_selector:
            - '1735991200886'
            - category
            - output
          - comparison_operator: is
            id: 4fdf8bf2-c89e-402a-ac58-c82352e6075b
            value: 支持语言
            varType: string
            variable_selector:
            - '1735991200886'
            - category
            - output
          id: 158fbc3f-313f-4f5c-8dea-54518e87e7c4
          logical_operator: or
        - case_id: 39c9ad79-e6a1-458e-a933-8159cfbdcc22
          conditions:
          - comparison_operator: is
            id: 09e9ac54-7a5f-447d-ab1b-d7c72fb371f7
            value: 支付相关问题
            varType: string
            variable_selector:
            - '1735991200886'
            - category
            - output
          id: 39c9ad79-e6a1-458e-a933-8159cfbdcc22
          logical_operator: and
        desc: ''
        selected: false
        title: 条件分支
        type: if-else
      height: 248
      id: '1735989855659'
      position:
        x: 1229.008143715625
        y: 323.5
      positionAbsolute:
        x: 1229.008143715625
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        output_type: string
        selected: false
        title: 支持语言
        type: variable-aggregator
        variables:
        - - '1735989494631'
          - class_name
      height: 108
      id: '1735991188016'
      position:
        x: 636
        y: 323.5
      positionAbsolute:
        x: 636
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        advanced_settings:
          group_enabled: true
          groups:
          - groupId: e68dc7c7-63fb-450e-880f-757a55c8e506
            group_name: lang
            output_type: string
            variables:
            - - '1735991188016'
              - output
          - groupId: 3d82a41c-aa44-4250-816f-d95fa477fac2
            group_name: category
            output_type: string
            variables:
            - - '1711528709608'
              - class_name
        desc: ''
        output_type: string
        selected: false
        title: 变量聚合器 2
        type: variable-aggregator
        variables:
        - - '1735991188016'
          - output
      height: 160
      id: '1735991200886'
      position:
        x: 939
        y: 323.5
      positionAbsolute:
        x: 939
        y: 323.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        output_type: string
        selected: false
        title: 问题类型
        type: variable-aggregator
        variables:
        - - '1711528709608'
          - class_name
      height: 108
      id: '1735991266308'
      position:
        x: 636
        y: 610.5
      positionAbsolute:
        x: 636
        y: 610.5
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -1166.4690368307529
      y: -164.72829605289138
      zoom: 0.9236555375410264

@lzcmagic
Copy link

lzcmagic commented Jan 6, 2025

The problem of categorizing branches of the problem still exists.

@lzcmagic
Copy link

lzcmagic commented Jan 6, 2025

It's not just conditional branching, it's also a problem with problem classifiers.

@Hisir0909
Copy link
Contributor Author

You misunderstood me. I meant that the latest 0.14.2 does not include this fix yet, it will be in the next version.

@Hisir0909
Copy link
Contributor Author

If you want to check if #12105 has fixed your issue, please start the test from the source code.

@yihong0618
Copy link
Contributor

If you want to check if #12105 has fixed your issue, please start the test from the source code.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants