An error occurred when I enabled the 'Event Stream' in the GLM model. #6072

Closed
opened 2026-02-21 18:13:56 -05:00 by yindo · 3 comments
Owner

Originally created by @douxc on GitHub (Oct 13, 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

latest

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

20241014-100628
It works as expected if i disabled 'Event Stream'

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @douxc on GitHub (Oct 13, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version latest ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce ![20241014-100628](https://github.com/user-attachments/assets/70566e43-5bc8-46cc-b8f5-d073f6b376fc) It works as expected if i disabled 'Event Stream' ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:13:56 -05:00
yindo closed this issue 2026-02-21 18:13:56 -05:00
Author
Owner

@douxc commented on GitHub (Oct 13, 2024):

dsl

app:
  description: t
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: advanced-chat
  name: t
  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: 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:
        sourceType: start
        targetType: llm
      id: 1726711439620-llm
      source: '1726711439620'
      sourceHandle: source
      target: llm
      targetHandle: target
      type: custom
    - data:
        isInIteration: false
        sourceType: llm
        targetType: answer
      id: llm-source-answer-target
      source: llm
      sourceHandle: source
      target: answer
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables: []
      height: 54
      id: '1726711439620'
      position:
        x: 80
        y: 282
      positionAbsolute:
        x: 80
        y: 282
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        memory:
          role_prefix:
            assistant: ''
            user: ''
          window:
            enabled: false
            size: 10
        model:
          completion_params:
            stream: false
            temperature: 0.7
          mode: chat
          name: glm-4-plus
          provider: zhipuai
        prompt_template:
        - id: a78c7665-932b-49be-bffa-63f46ff014c6
          role: system
          text: ''
        selected: true
        title: LLM
        type: llm
        variables: []
        vision:
          enabled: false
      height: 98
      id: llm
      position:
        x: 348
        y: 194
      positionAbsolute:
        x: 348
        y: 194
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        answer: '{{#llm.text#}}'
        desc: ''
        selected: false
        title: 直接回复
        type: answer
        variables: []
      height: 107
      id: answer
      position:
        x: 769
        y: 100
      positionAbsolute:
        x: 769
        y: 100
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: 254.75402520766323
      y: 397.50899601162155
      zoom: 0.9835020740262486
@douxc commented on GitHub (Oct 13, 2024): dsl ```yml app: description: t icon: 🤖 icon_background: '#FFEAD5' mode: advanced-chat name: t 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: 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: sourceType: start targetType: llm id: 1726711439620-llm source: '1726711439620' sourceHandle: source target: llm targetHandle: target type: custom - data: isInIteration: false sourceType: llm targetType: answer id: llm-source-answer-target source: llm sourceHandle: source target: answer targetHandle: target type: custom zIndex: 0 nodes: - data: desc: '' selected: false title: 开始 type: start variables: [] height: 54 id: '1726711439620' position: x: 80 y: 282 positionAbsolute: x: 80 y: 282 sourcePosition: right targetPosition: left type: custom width: 244 - data: context: enabled: false variable_selector: [] desc: '' memory: role_prefix: assistant: '' user: '' window: enabled: false size: 10 model: completion_params: stream: false temperature: 0.7 mode: chat name: glm-4-plus provider: zhipuai prompt_template: - id: a78c7665-932b-49be-bffa-63f46ff014c6 role: system text: '' selected: true title: LLM type: llm variables: [] vision: enabled: false height: 98 id: llm position: x: 348 y: 194 positionAbsolute: x: 348 y: 194 selected: true sourcePosition: right targetPosition: left type: custom width: 244 - data: answer: '{{#llm.text#}}' desc: '' selected: false title: 直接回复 type: answer variables: [] height: 107 id: answer position: x: 769 y: 100 positionAbsolute: x: 769 y: 100 selected: false sourcePosition: right targetPosition: left type: custom width: 244 viewport: x: 254.75402520766323 y: 397.50899601162155 zoom: 0.9835020740262486 ```
Author
Owner

@hjlarry commented on GitHub (Oct 14, 2024):

Hi @AAEE86, the stream option is added by this PR: https://github.com/langgenius/dify/pull/8078

seems we don't need this option? dify will handle whether use stream itself.
this issue is caused by this line , there are two stream params in one function.

@hjlarry commented on GitHub (Oct 14, 2024): Hi @AAEE86, the `stream` option is added by this PR: https://github.com/langgenius/dify/pull/8078 seems we don't need this option? dify will handle whether use `stream` itself. this issue is caused by this [line](https://github.com/langgenius/dify/blob/de3c5751db8bca0c0795abbc7f6bddfb31d7779d/api/core/model_runtime/model_providers/zhipuai/llm/llm.py#L299) , there are two stream params in one function.
Author
Owner

@AAEE86 commented on GitHub (Oct 14, 2024):

Hi @AAEE86, the stream option is added by this PR: #8078

seems we don't need this option? dify will handle whether use stream itself. this issue is caused by this line , there are two stream params in one function.

If it is no longer needed, you can delete it.

@AAEE86 commented on GitHub (Oct 14, 2024): > Hi @AAEE86, the `stream` option is added by this PR: #8078 > > seems we don't need this option? dify will handle whether use `stream` itself. this issue is caused by this [line](https://github.com/langgenius/dify/blob/de3c5751db8bca0c0795abbc7f6bddfb31d7779d/api/core/model_runtime/model_providers/zhipuai/llm/llm.py#L299) , there are two stream params in one function. If it is no longer needed, you can delete it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6072