Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: question classifier instruction npe (#4931)

takatost21ac2afb3abc
diff --git a/api/core/workflow/nodes/question_classifier/question_classifier_node.py b/api/core/workflow/nodes/question_classifier/question_classifier_node.py
index 06c8e419597..76f3dec8366 100644
--- a/api/core/workflow/nodes/question_classifier/question_classifier_node.py
+++ b/api/core/workflow/nodes/question_classifier/question_classifier_node.py
@@ -50,7 +50,7 @@ class QuestionClassifierNode(LLMNode):
# fetch memory
memory = self._fetch_memory(node_data.memory, variable_pool, model_instance)
# fetch instruction
- instruction = self._format_instruction(node_data.instruction, variable_pool)
+ instruction = self._format_instruction(node_data.instruction, variable_pool) if node_data.instruction else ''
node_data.instruction = instruction
# fetch prompt messages
prompt_messages, stop = self._fetch_prompt(