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 single-step runs support user input as structured_output variable values (#26430)

goofyb4d435120396
diff --git a/api/core/workflow/workflow_entry.py b/api/core/workflow/workflow_entry.py
index 49645ff120f..3801dfe15df 100644
--- a/api/core/workflow/workflow_entry.py
+++ b/api/core/workflow/workflow_entry.py
@@ -416,4 +416,8 @@ class WorkflowEntry:
# append variable and value to variable pool
if variable_node_id != ENVIRONMENT_VARIABLE_NODE_ID:
+ # In single run, the input_value is set as the LLM's structured output value within the variable_pool.
+ 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]
variable_pool.add([variable_node_id] + variable_key_list, input_value)