MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / collect_node_inputs

Function collect_node_inputs

masfactory/compatibility/dify/runtime.py:124–134  ·  view source on GitHub ↗
(data: dict[str, Any], state: DifyRuntimeState)

Source from the content-addressed store, hash-verified

122
123
124def collect_node_inputs(data: dict[str, Any], state: DifyRuntimeState) -> dict[str, Any]:
125 inputs: dict[str, Any] = {}
126 for item in data.get("variables") or []:
127 if not isinstance(item, dict):
128 continue
129 name = item.get("variable")
130 selector = item.get("value_selector")
131 if name is None or not selector:
132 continue
133 inputs[str(name)] = state.resolve_selector(selector)
134 return inputs
135
136
137def run_dify_code(code: str, variables: dict[str, Any]) -> dict[str, Any]:

Callers 2

forwardFunction · 0.90
_run_inner_subgraphFunction · 0.90

Calls 1

resolve_selectorMethod · 0.80

Tested by

no test coverage detected