11"""
22ScriptCreatorMultiGraph Module
33"""
4+ from copy import deepcopy
45from typing import List , Optional
56from pydantic import BaseModel
67from .base_graph import BaseGraph
@@ -45,7 +46,7 @@ def __init__(self, prompt: str, source: List[str],
4546 self .max_results = config .get ("max_results" , 3 )
4647
4748 self .copy_config = safe_deepcopy (config )
48-
49+ self . copy_schema = deepcopy ( schema )
4950 super ().__init__ (prompt , config , source , schema )
5051
5152 def _create_graph (self ) -> BaseGraph :
@@ -55,19 +56,14 @@ def _create_graph(self) -> BaseGraph:
5556 BaseGraph: A graph instance representing the web scraping and searching workflow.
5657 """
5758
58- script_generator_instance = ScriptCreatorGraph (
59- prompt = "" ,
60- source = "" ,
61- config = self .copy_config ,
62- schema = self .schema
63- )
64-
6559 graph_iterator_node = GraphIteratorNode (
6660 input = "user_prompt & urls" ,
6761 output = ["scripts" ],
6862 node_config = {
69- "graph_instance" : script_generator_instance ,
70- }
63+ "graph_instance" : ScriptCreatorGraph ,
64+ "scraper_config" : self .copy_config ,
65+ },
66+ schema = self .copy_schema
7167 )
7268
7369 merge_scripts_node = MergeGeneratedScriptsNode (
0 commit comments