MCPcopy Create free account
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / __init__

Method __init__

scrapegraphai/graphs/base_graph.py:56–81  ·  view source on GitHub ↗
(
        self,
        nodes: list,
        edges: list,
        entry_point: str,
        use_burr: bool = False,
        burr_config: dict = None,
        graph_name: str = "Custom",
    )

Source from the content-addressed store, hash-verified

54 """
55
56 def __init__(
57 self,
58 nodes: list,
59 edges: list,
60 entry_point: str,
61 use_burr: bool = False,
62 burr_config: dict = None,
63 graph_name: str = "Custom",
64 ):
65 self.nodes = nodes
66 self.raw_edges = edges
67 self.edges = self._create_edges(set(edges))
68 self.entry_point = entry_point.node_name
69 self.graph_name = graph_name
70 self.initial_state = {}
71 self.callback_manager = CustomLLMCallbackManager()
72
73 if nodes[0].node_name != entry_point.node_name:
74 warnings.warn(
75 "Careful! The entry point node is different from the first node in the graph."
76 )
77
78 self._set_conditional_node_edges()
79
80 self.use_burr = use_burr
81 self.burr_config = burr_config or {}
82
83 def _create_edges(self, edges: list) -> dict:
84 """

Callers

nothing calls this directly

Calls 3

_create_edgesMethod · 0.95

Tested by

no test coverage detected