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.

Support node reference multiple structured_output variables in single-step run (#26661)

goofy33ff01d04c59
diff --git a/api/core/workflow/workflow_entry.py b/api/core/workflow/workflow_entry.py
index 742c42ec2b0..a6c6784e39e 100644
--- a/api/core/workflow/workflow_entry.py
+++ b/api/core/workflow/workflow_entry.py
@@ -421,4 +421,10 @@ class WorkflowEntry:
if len(variable_key_list) == 2 and variable_key_list[0] == "structured_output":
input_value = {variable_key_list[1]: input_value}
variable_key_list = variable_key_list[0:1]
+
+ # Support for a single node to reference multiple structured_output variables
+ current_variable = variable_pool.get([variable_node_id] + variable_key_list)
+ if current_variable and isinstance(current_variable.value, dict):
+ input_value = current_variable.value | input_value
+
variable_pool.add([variable_node_id] + variable_key_list, input_value)