Workflow - Error #5526

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

Originally created by @ip2cloud on GitHub (Sep 10, 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.8.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image Version 0.7.2 It's working correctly... when it goes through the classifier, it doesn't show anything other than what is instructed in the response node. image image Version 0.8.0 It is coming beyond what is instructed in the response node.

✔️ Expected Behavior

only see what is in the response node.

Actual Behavior

what is coming in the classifier node, prior to the response node
image
image

Originally created by @ip2cloud on GitHub (Sep 10, 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 0.8.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="407" alt="image" src="https://github.com/user-attachments/assets/3f3fe28e-645b-4cea-83dc-39f80ab0f815"> Version 0.7.2 It's working correctly... when it goes through the classifier, it doesn't show anything other than what is instructed in the response node. <img width="413" alt="image" src="https://github.com/user-attachments/assets/13f9009b-948c-4c6f-98d6-cc7c3274a024"> <img width="931" alt="image" src="https://github.com/user-attachments/assets/5e4b0333-5085-4a20-94b6-90638d58b11e"> Version 0.8.0 It is coming beyond what is instructed in the response node. ### ✔️ Expected Behavior only see what is in the response node. ### ❌ Actual Behavior what is coming in the classifier node, prior to the response node <img width="402" alt="image" src="https://github.com/user-attachments/assets/70376b12-49b4-45b5-bc9f-846e7cd9adbb"> <img width="403" alt="image" src="https://github.com/user-attachments/assets/642ed789-40ad-45ed-b189-7904cc4f07b1">
yindo added the 🐞 bug label 2026-02-21 18:11:26 -05:00
yindo closed this issue 2026-02-21 18:11:26 -05:00
Author
Owner

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

Hello @ip2cloud! I'm here to assist you with any bugs, questions, or contributions you might have. Let's tackle this issue together!

The issue you're experiencing in version 0.8.0, where the classifier node shows more than what is instructed in the response node, is due to changes in the _get_prompt_template method. In version 0.8.0, additional prompt messages for the assistant and user roles are included, which were not present in version 0.7.2. These additional messages provide more context and constraints for the classification task, resulting in the classifier node displaying more information.

Specifically, the following additional prompt messages are included in version 0.8.0:

assistant_prompt_message_1 = ChatModelMessage(
    role=PromptMessageRole.ASSISTANT,
    text=QUESTION_CLASSIFIER_ASSISTANT_PROMPT_1
)
prompt_messages.append(assistant_prompt_message_1)

user_prompt_message_2 = ChatModelMessage(
    role=PromptMessageRole.USER,
    text=QUESTION_CLASSIFIER_USER_PROMPT_2
)
prompt_messages.append(user_prompt_message_2)

assistant_prompt_message_2 = ChatModelMessage(
    role=PromptMessageRole.ASSISTANT,
    text=QUESTION_CLASSIFIER_ASSISTANT_PROMPT_2
)
prompt_messages.append(assistant_prompt_message_2)

Additionally, the QUESTION_CLASSIFIER_SYSTEM_PROMPT and QUESTION_CLASSIFIER_COMPLETION_PROMPT in version 0.8.0 include detailed instructions and examples that were not present in version 0.7.2. These prompts provide comprehensive context and constraints for the classification task, which results in the classifier node showing more information than what is instructed in the response node [1][2].

To resolve this, you may need to adjust the prompt templates or the configuration of the classifier node to align with your expected behavior.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 10, 2024): <!-- Greeting --> Hello @ip2cloud! I'm here to assist you with any bugs, questions, or contributions you might have. Let's tackle this issue together! <!-- Answer --> The issue you're experiencing in version 0.8.0, where the classifier node shows more than what is instructed in the response node, is due to changes in the `_get_prompt_template` method. In version 0.8.0, additional prompt messages for the assistant and user roles are included, which were not present in version 0.7.2. These additional messages provide more context and constraints for the classification task, resulting in the classifier node displaying more information. Specifically, the following additional prompt messages are included in version 0.8.0: ```py assistant_prompt_message_1 = ChatModelMessage( role=PromptMessageRole.ASSISTANT, text=QUESTION_CLASSIFIER_ASSISTANT_PROMPT_1 ) prompt_messages.append(assistant_prompt_message_1) user_prompt_message_2 = ChatModelMessage( role=PromptMessageRole.USER, text=QUESTION_CLASSIFIER_USER_PROMPT_2 ) prompt_messages.append(user_prompt_message_2) assistant_prompt_message_2 = ChatModelMessage( role=PromptMessageRole.ASSISTANT, text=QUESTION_CLASSIFIER_ASSISTANT_PROMPT_2 ) prompt_messages.append(assistant_prompt_message_2) ``` Additionally, the `QUESTION_CLASSIFIER_SYSTEM_PROMPT` and `QUESTION_CLASSIFIER_COMPLETION_PROMPT` in version 0.8.0 include detailed instructions and examples that were not present in version 0.7.2. These prompts provide comprehensive context and constraints for the classification task, which results in the classifier node showing more information than what is instructed in the response node <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/question_classifier/question_classifier_node.py)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/question_classifier/template_prompts.py)</sup>. To resolve this, you may need to adjust the prompt templates or the configuration of the classifier node to align with your expected behavior. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

But if in the response node I only put output if only OK it should be just OK and not anything other than OK

@ip2cloud commented on GitHub (Sep 10, 2024): But if in the response node I only put output if only OK it should be just OK and not anything other than OK
Author
Owner

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

The response node outputs more than just "OK" when only "OK" is specified because the return values of an HTTP request include not only the response body but also the status code, response headers, and files. This comprehensive return data is designed to improve processing efficiency and handle responses with files straightforwardly [1].

To ensure the response node only outputs "OK" without additional information, you can define a fixed text content in the text editor of the response node. Here is how you can do it:

  1. Open the text editor for the response node.
  2. Enter the desired fixed text content.

For example, to output "OK" as the response:

OK

This configuration ensures that the response node outputs only the specified response "OK" without any additional information [2][3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 10, 2024): <!-- Answer --> The response node outputs more than just "OK" when only "OK" is specified because the return values of an HTTP request include not only the response body but also the status code, response headers, and files. This comprehensive return data is designed to improve processing efficiency and handle responses with files straightforwardly <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/http-request.md)</sup>. To ensure the response node only outputs "OK" without additional information, you can define a fixed text content in the text editor of the response node. Here is how you can do it: 1. Open the text editor for the response node. 2. Enter the desired fixed text content. For example, to output "OK" as the response: ```md OK ``` This configuration ensures that the response node outputs only the specified response "OK" without any additional information <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/node/answer.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/answer.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

but it's like this... sir robot...

Still it's coming beyond ok

@ip2cloud commented on GitHub (Sep 10, 2024): but it's like this... sir robot... Still it's coming beyond ok
Author
Owner

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

It seems like this issue requires a deeper look, @takatost could you please lend your expertise?

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 10, 2024): <!-- Answer --> It seems like this issue requires a deeper look, @takatost could you please lend your expertise? <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

Captura de Tela 2024-09-10 às 16 23 51
@ip2cloud commented on GitHub (Sep 10, 2024): <img width="1211" alt="Captura de Tela 2024-09-10 às 16 23 51" src="https://github.com/user-attachments/assets/33003907-da14-4e66-84f3-cb4feefc3f22">
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

image with problems image

No problem! I discovered that when we place a response node after the classification node... it will always pick up more than just the responses.

@ip2cloud commented on GitHub (Sep 10, 2024): <img width="846" alt="image" src="https://github.com/user-attachments/assets/ddfaf5bb-6569-4086-8fd3-f8bdd1d82ea3"> with problems <img width="1277" alt="image" src="https://github.com/user-attachments/assets/5eb56814-ec32-4d69-967a-a91c91b05084"> No problem! I discovered that when we place a response node after the classification node... it will always pick up more than just the responses.
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

Captura de Tela 2024-09-10 às 16 40 53 Captura de Tela 2024-09-10 às 16 41 45
@ip2cloud commented on GitHub (Sep 10, 2024): <img width="865" alt="Captura de Tela 2024-09-10 às 16 40 53" src="https://github.com/user-attachments/assets/4bcd6347-a1fe-40b3-9883-4750185df98a"> <img width="448" alt="Captura de Tela 2024-09-10 às 16 41 45" src="https://github.com/user-attachments/assets/b77afefb-c993-4a84-95f2-9a4fd44fafde">
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

it is printing everything that enters the classifier... that is, it is not classifying. In other words, parallel processing is working in the classifier node... where I think it shouldn't work here.

@ip2cloud commented on GitHub (Sep 10, 2024): it is printing everything that enters the classifier... that is, it is not classifying. In other words, parallel processing is working in the classifier node... where I think it shouldn't work here.
Author
Owner

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

I think you can pull the v0.8.0 again and this should be resolved. We deleted the previous release but keep the same version number.

@crazywoola commented on GitHub (Sep 10, 2024): I think you can pull the v0.8.0 again and this should be resolved. We deleted the previous release but keep the same version number.
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

I did the update and it still continues... It is processing the classifieds in parallel too...

@ip2cloud commented on GitHub (Sep 10, 2024): I did the update and it still continues... It is processing the classifieds in parallel too...
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

Captura de Tela 2024-09-10 às 22 54 56
Captura de Tela 2024-09-10 às 22 56 57

The blue wasn't supposed to come out, just the red.
The blue was just for the classifier to take the route.

@ip2cloud commented on GitHub (Sep 10, 2024): ![Captura de Tela 2024-09-10 às 22 54 56](https://github.com/user-attachments/assets/160c71a6-6a92-45b3-b125-04b9d0d942c8) ![Captura de Tela 2024-09-10 às 22 56 57](https://github.com/user-attachments/assets/a49b792c-97e2-4a2f-a7a4-359091b0032c) The blue wasn't supposed to come out, just the red. The blue was just for the classifier to take the route.
Author
Owner

@ip2cloud commented on GitHub (Sep 10, 2024):

corrected in main langgenius/dify-web:main langgenius/dify-web:main

@ip2cloud commented on GitHub (Sep 10, 2024): corrected in main langgenius/dify-web:main langgenius/dify-web:main
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5526