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

[BUG] Post-processing text does not appear correctly #4240

Open
nikitas-novatix opened this issue Apr 1, 2025 · 0 comments
Open

[BUG] Post-processing text does not appear correctly #4240

nikitas-novatix opened this issue Apr 1, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@nikitas-novatix
Copy link

Describe the bug

Markdown formatting is not rendered correctly in the chat output when a Post-Processing is activated in the Flowise flow, even if the function is just a passthrough. Specifically, newline characters seem to be replaced by the literal string FLOWISE_NEWLINE, and Markdown elements like titles (using #) are not interpreted. This results in a broken and unformatted chat message display.

To Reproduce

Steps to reproduce the behavior:

  • Create a new Chat Flow in Flowise.
  • Add an LLM Chain (e.g., using OpenAI or Azure OpenAI) configured to generate Markdown output.
  • Add a Post Processing function (in Settings->Post Processing)
  • In the Post Processing function, simply return the raw output from the previous node: return $flow.rawOutput;
  • In the chat interface, ask a question that prompts the LLM to generate a response containing Markdown formatting
  • Observe the chat output. Markdown formatting will be broken; newlines will be replaced with FLOWISE_NEWLINE, and titles will not be rendered as headings.

Expected behavior

Markdown formatting generated by the LLM Chain should be rendered correctly in the Chat Output, even when passing through a Post-processing function. The chat message should display formatted text with newlines, headings, and other Markdown elements.

Screenshots

Image

Setup

Installation: Azure App Service

Flowise Version: 2.2.7-patch.1

OS: macOS

Browser: Chrome

Additional context

The issue occurs even when the Post Processing function is a simple passthrough function, just returning the $flow.rawOutput directly. This suggests that Flowise may be processing outputs from the JS function differently from direct LLM node outputs, possibly treating them as plain text and applying unwanted sanitization or string replacements that break Markdown rendering. This significantly impacts the ability to use Post Processing in flows where maintaining Markdown formatting is important for the user interface.

@nikitas-novatix nikitas-novatix changed the title [BUG] Post-processing [BUG] Post-processing text does not appear correctly Apr 1, 2025
@HenryHengZJ HenryHengZJ added the bug Something isn't working label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants