fix: question classifier instruction npe (#4931)

This commit is contained in:
takatost 2024-06-05 01:27:58 +08:00 committed by GitHub
parent f7dd327bc2
commit 21ac2afb3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(