Has inputs mixin
Mixins for pipeline steps.
References
NONE
HasInputsMixin(input_map=None)
Mixin class for steps that consume a unified input_map.
The input_map maps argument names to either a state/config key (str) or a fixed value (Val). Resolution semantics: 1. For str specs: read from state first; if missing, fall back to config["configurable"]. 2. For Val specs: use the literal value.
Attributes:
| Name | Type | Description |
|---|---|---|
input_map |
dict[str, str | Val]
|
Mapping of argument names to either a state/config key (str) or a fixed value (Val). |
Initialize with a unified input_map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_map |
dict[str, str | Val] | list[str | dict[str, str] | dict[str, Val]] | None
|
Mapping of argument names to either a state/config key (str) or a fixed value (Val). Also accepts a list form for ergonomics: 1. str: identity mapping ("key" -> {"key": "key"}) 2. dict[str, str]: explicit mapping to state/config key 3. dict[str, Val]: fixed/literal value Defaults to None, in which case an empty mapping is used. |
None
|
from_legacy_map(input_state_map, runtime_config_map, fixed_args)
classmethod
Synthesize an input_map from state/config mappings and fixed args.
Precedence: fixed_args > runtime_config_map > input_state_map.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_state_map |
dict[str, str] | None
|
Mapping of argument names to state keys. Defaults to None, in which case an empty mapping is used. |
required |
runtime_config_map |
dict[str, str] | None
|
Mapping of argument names to runtime configuration keys. Defaults to None, in which case an empty mapping is used. |
required |
fixed_args |
dict[str, Any] | None
|
Mapping of argument names to fixed values. Defaults to None, in which case an empty mapping is used. |
required |
Returns:
| Type | Description |
|---|---|
dict[str, str | Val]
|
dict[str, str | Val]: The synthesized input_map. |