MCPcopy
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / get_input_keys

Method get_input_keys

scrapegraphai/nodes/base_node.py:98–117  ·  view source on GitHub ↗

Determines the necessary state keys based on the input specification. Args: state (dict): The current state of the graph used to parse input keys. Returns: List[str]: A list of input keys required for node operation. Raises: Val

(self, state: dict)

Source from the content-addressed store, hash-verified

96 setattr(self, key, val)
97
98 def get_input_keys(self, state: dict) -> List[str]:
99 """
100 Determines the necessary state keys based on the input specification.
101
102 Args:
103 state (dict): The current state of the graph used to parse input keys.
104
105 Returns:
106 List[str]: A list of input keys required for node operation.
107
108 Raises:
109 ValueError: If error occurs in parsing input keys.
110 """
111
112 try:
113 input_keys = self._parse_input_keys(state, self.input)
114 self._validate_input_keys(input_keys)
115 return input_keys
116 except ValueError as e:
117 raise ValueError(f"Error parsing input keys for {self.node_name}") from e
118
119 def _validate_input_keys(self, input_keys):
120 """

Callers 15

executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
_async_executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 2

_parse_input_keysMethod · 0.95
_validate_input_keysMethod · 0.95

Tested by

no test coverage detected