Workflow LLM node stop sequence to '\n' will be escape to '\\n'. #3056

Closed
opened 2026-02-21 17:53:15 -05:00 by yindo · 0 comments
Owner

Originally created by @sagarey on GitHub (May 8, 2024).

Originally assigned to: @guchenhe on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a quesion, 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.6

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In workflow setting the stop sequence to '\n' in the LLM node will be escaped, LLM API receives it as '\\n'.
屏幕截图 2024-05-09 010741

OpenAI-API-compatible Model Provider:
image

✔️ Expected Behavior

The stop sequence configured on the frontend same as finally called stop config.
image

Actual Behavior

Configuration is escaped.
屏幕截图 2024-05-09 011833

Originally created by @sagarey on GitHub (May 8, 2024). Originally assigned to: @guchenhe on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a quesion, 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] Pleas do not modify this template :) and fill in all the required fields. ### Dify version 0.6.6 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce In workflow setting the stop sequence to '\n' in the LLM node will be escaped, LLM API receives it as '\\\n'. ![屏幕截图 2024-05-09 010741](https://github.com/langgenius/dify/assets/5120456/c54740ee-c517-43d2-b11f-837488207f0f) OpenAI-API-compatible Model Provider: ![image](https://github.com/langgenius/dify/assets/5120456/7f970b83-030e-4870-be13-88864d345dab) ### ✔️ Expected Behavior The stop sequence configured on the frontend same as finally called stop config. <img width="974" alt="image" src="https://github.com/langgenius/dify/assets/5120456/4c4c4ff8-fc33-48ce-862f-c321abb07705"> ### ❌ Actual Behavior Configuration is escaped. ![屏幕截图 2024-05-09 011833](https://github.com/langgenius/dify/assets/5120456/0a30fda2-4d17-4888-9f0d-fdff3c821db9)
yindo added the 🐞 bug label 2026-02-21 17:53:15 -05:00
yindo closed this issue 2026-02-21 17:53:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3056