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)
| 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 | """ |