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

Method __init__

scrapegraphai/nodes/reasoning_node.py:33–54  ·  view source on GitHub ↗
(
        self,
        input: str,
        output: List[str],
        node_config: Optional[dict] = None,
        node_name: str = "PromptRefiner",
    )

Source from the content-addressed store, hash-verified

31 """
32
33 def __init__(
34 self,
35 input: str,
36 output: List[str],
37 node_config: Optional[dict] = None,
38 node_name: str = "PromptRefiner",
39 ):
40 super().__init__(node_name, "node", input, output, 2, node_config)
41
42 self.llm_model = node_config["llm_model"]
43
44 if isinstance(node_config["llm_model"], ChatOllama):
45 self.llm_model.format = "json"
46
47 self.verbose = (
48 True if node_config is None else node_config.get("verbose", False)
49 )
50 self.force = False if node_config is None else node_config.get("force", False)
51
52 self.additional_info = node_config.get("additional_info", None)
53
54 self.output_schema = node_config.get("schema")
55
56 def execute(self, state: dict) -> dict:
57 """

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected