From abe34a71f77a41df1e0bec2c43c5af1cd1ecb9e0 Mon Sep 17 00:00:00 2001 From: Novice Date: Thu, 20 Mar 2025 09:08:51 +0800 Subject: [PATCH] fix: question classify can't use --- api/core/workflow/nodes/llm/node.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/core/workflow/nodes/llm/node.py b/api/core/workflow/nodes/llm/node.py index 438256c7ef..f9733a88d6 100644 --- a/api/core/workflow/nodes/llm/node.py +++ b/api/core/workflow/nodes/llm/node.py @@ -513,7 +513,11 @@ class LLMNode(BaseNode[LLMNodeData]): # model config completion_params = node_data_model.completion_params - if self.node_data.structured_output_enabled and self.node_data.structured_output: + if ( + isinstance(self.node_data, LLMNodeData) + and self.node_data.structured_output_enabled + and self.node_data.structured_output + ): completion_params["structured_output_schema"] = json.dumps( self.node_data.structured_output.get("schema", {}), ensure_ascii=False )