mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
refactor pipeline and remove node run run_args
This commit is contained in:
@ -19,14 +19,17 @@ class ValueType(Enum):
|
||||
|
||||
class VariablePool:
|
||||
variables_mapping = {}
|
||||
user_inputs: dict
|
||||
|
||||
def __init__(self, system_variables: dict[SystemVariable, Any]) -> None:
|
||||
def __init__(self, system_variables: dict[SystemVariable, Any],
|
||||
user_inputs: dict) -> None:
|
||||
# system variables
|
||||
# for example:
|
||||
# {
|
||||
# 'query': 'abc',
|
||||
# 'files': []
|
||||
# }
|
||||
self.user_inputs = user_inputs
|
||||
for system_variable, value in system_variables.items():
|
||||
self.append_variable('sys', [system_variable.value], value)
|
||||
|
||||
|
||||
@ -18,15 +18,13 @@ class WorkflowNodeAndResult:
|
||||
class WorkflowRunState:
|
||||
workflow: Workflow
|
||||
start_at: float
|
||||
user_inputs: dict
|
||||
variable_pool: VariablePool
|
||||
|
||||
total_tokens: int = 0
|
||||
|
||||
workflow_nodes_and_results: list[WorkflowNodeAndResult] = []
|
||||
|
||||
def __init__(self, workflow: Workflow, start_at: float, user_inputs: dict, variable_pool: VariablePool):
|
||||
def __init__(self, workflow: Workflow, start_at: float, variable_pool: VariablePool):
|
||||
self.workflow = workflow
|
||||
self.start_at = start_at
|
||||
self.user_inputs = user_inputs
|
||||
self.variable_pool = variable_pool
|
||||
|
||||
Reference in New Issue
Block a user