(data: dict[str, Any], state: DifyRuntimeState)
| 122 | |
| 123 | |
| 124 | def 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 | |
| 137 | def run_dify_code(code: str, variables: dict[str, Any]) -> dict[str, Any]: |
no test coverage detected