MCPcopy Index your code
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / _create_graph

Method _create_graph

tests/graphs/abstract_graph_test.py:82–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

80 super().__init__(prompt, config)
81
82 def _create_graph(self) -> BaseGraph:
83 fetch_node = FetchNode(
84 input="url| local_dir",
85 output=["doc"],
86 node_config={
87 "llm_model": self.llm_model,
88 "force": self.config.get("force", False),
89 "cut": self.config.get("cut", True),
90 "loader_kwargs": self.config.get("loader_kwargs", {}),
91 "browser_base": self.config.get("browser_base"),
92 },
93 )
94 parse_node = ParseNode(
95 input="doc",
96 output=["parsed_doc"],
97 node_config={"llm_model": self.llm_model, "chunk_size": self.model_token},
98 )
99 return BaseGraph(
100 nodes=[fetch_node, parse_node],
101 edges=[
102 (fetch_node, parse_node),
103 ],
104 entry_point=fetch_node,
105 graph_name=self.__class__.__name__,
106 )
107
108 def run(self) -> str:
109 inputs = {"user_prompt": self.prompt, self.input_key: self.source}

Callers

nothing calls this directly

Calls 4

FetchNodeClass · 0.90
ParseNodeClass · 0.90
BaseGraphClass · 0.90
getMethod · 0.80

Tested by

no test coverage detected