Skip to content

Commit 778efd4

Browse files
committed
fix: conditional node
1 parent b7f64b6 commit 778efd4

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

scrapegraphai/nodes/conditional_node.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""
1+
"""
22
Module for implementing the conditional node
33
"""
44
from typing import Optional, List
@@ -28,21 +28,11 @@ class ConditionalNode(BaseNode):
2828
2929
"""
3030

31-
def __init__(self,
32-
input: str,
33-
output: List[str],
34-
node_config: Optional[dict] = None,
35-
node_name: str = "GenerateAnswerCSV",
36-
):
31+
def __init__(self):
3732
"""
38-
Initializes the node with the key to check and the next node names based on the condition.
39-
40-
Args:
41-
key_name (str): The name of the key to check in the state.
33+
Initializes an empty ConditionalNode.
4234
"""
43-
44-
#super().__init__(node_name, "node", input, output, 2, node_config)
45-
35+
pass
4636

4737
def execute(self, state: dict) -> dict:
4838
"""
@@ -55,8 +45,4 @@ def execute(self, state: dict) -> dict:
5545
str: The name of the next node to execute based on the presence of the key.
5646
"""
5747

58-
if self.key_name in state and len(state[self.key_name]) > 0:
59-
state["next_node"] = 0
60-
else:
61-
state["next_node"] = 1
62-
return state
48+
pass

0 commit comments

Comments
 (0)