The end node in workflow mode does not support line breaks between llm variable outputs. #5371

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

Originally created by @Modas-Li on GitHub (Sep 3, 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

V0.7.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

workflow mode with several llm nodes, when output content, there is no line break between each llm output.

✔️ Expected Behavior

fix it

Actual Behavior

No response

Originally created by @Modas-Li on GitHub (Sep 3, 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 V0.7.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce workflow mode with several llm nodes, when output content, there is no line break between each llm output. ### ✔️ Expected Behavior fix it ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 18:10:39 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 3, 2024):

The end node in workflow mode does not support line breaks between LLM variable outputs in Dify version V0.7.3 because the code for rendering the outputs uses a div with the class space-y-0.5, which applies a small vertical margin between each output. This setup does not include any logic or styling to handle line breaks explicitly.

Here is the relevant part of the code:

return (
    <div className='mb-1 px-3 py-1 space-y-0.5'>
      {filteredOutputs.map(({ value_selector }, index) => {
        // ... other code ...
        return (
          <div key={index} className='flex items-center h-6 justify-between bg-gray-100 rounded-md  px-1 space-x-1 text-xs font-normal text-gray-700'>
            // ... other code ...
          </div>
        )
      })}
    </div>
)

The space-y-0.5 class only adds a small vertical space between each div, but it does not handle line breaks [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 3, 2024): <!-- Answer --> The end node in workflow mode does not support line breaks between LLM variable outputs in Dify version V0.7.3 because the code for rendering the outputs uses a `div` with the class `space-y-0.5`, which applies a small vertical margin between each output. This setup does not include any logic or styling to handle line breaks explicitly. Here is the relevant part of the code: ```tsx return ( <div className='mb-1 px-3 py-1 space-y-0.5'> {filteredOutputs.map(({ value_selector }, index) => { // ... other code ... return ( <div key={index} className='flex items-center h-6 justify-between bg-gray-100 rounded-md px-1 space-x-1 text-xs font-normal text-gray-700'> // ... other code ... </div> ) })} </div> ) ``` The `space-y-0.5` class only adds a small vertical space between each `div`, but it does not handle line breaks <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/end/node.tsx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Sep 4, 2024):

Use a jinja or code node to format the answer.

@crazywoola commented on GitHub (Sep 4, 2024): Use a jinja or code node to format the answer.
Author
Owner

@Modas-Li commented on GitHub (Sep 4, 2024):

the two node you mentioned does not support stream outputting

------------------ Original ------------------
From: crazywoola @.>
Date: Wed,Sep 4,2024 0:36 PM
To: langgenius/dify @.
>
Cc: Modas Li @.>, Author @.>
Subject: Re: [langgenius/dify] The end node in workflow mode does not supportline breaks between llm variable outputs. (Issue #7951)

Use a jinja or code node to format the answer.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

@Modas-Li commented on GitHub (Sep 4, 2024): the two node you mentioned does not support stream outputting ------------------ Original ------------------ From: crazywoola ***@***.***&gt; Date: Wed,Sep 4,2024 0:36 PM To: langgenius/dify ***@***.***&gt; Cc: Modas Li ***@***.***&gt;, Author ***@***.***&gt; Subject: Re: [langgenius/dify] The end node in workflow mode does not supportline breaks between llm variable outputs. (Issue #7951) Use a jinja or code node to format the answer. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: ***@***.***&gt;
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5371