Workflow - Error
Self Checks
- [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [X] I have searched for existing issues search for existing issues, including closed ones.
- [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [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
✔️ Expected Behavior
only see what is in the response node.
❌ Actual Behavior
what is coming in the classifier node, prior to the response node
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.
But if in the response node I only put output if only OK it should be just OK and not anything other than OK
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:
- Open the text editor for the response node.
- 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.
but it's like this... sir robot...
Still it's coming beyond ok
It seems like this issue requires a deeper look, @takatost could you please lend your expertise?
To continue talking to Dosu, mention @dosu.
with problems
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.
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.
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.
I did the update and it still continues... It is processing the classifieds in parallel too...
The blue wasn't supposed to come out, just the red. The blue was just for the classifier to take the route.
corrected in main langgenius/dify-web:main langgenius/dify-web:main