MCPcopy
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / execute

Method execute

scrapegraphai/integrations/burr_bridge.py:211–231  ·  view source on GitHub ↗

Execute the Burr application with the given initial state. Args: initial_state (dict): The initial state to pass to the Burr application. Returns: dict: The final state of the Burr application.

(self, initial_state: Dict[str, Any] = {})

Source from the content-addressed store, hash-verified

209 return state
210
211 def execute(self, initial_state: Dict[str, Any] = {}) -> Dict[str, Any]:
212 """
213 Execute the Burr application with the given initial state.
214
215 Args:
216 initial_state (dict): The initial state to pass to the Burr application.
217
218 Returns:
219 dict: The final state of the Burr application.
220 """
221
222 self.burr_app = self._initialize_burr_app(initial_state)
223
224 # TODO: to fix final nodes detection
225 final_nodes = [self.burr_app.graph.actions[-1].name]
226
227 last_action, result, final_state = self.burr_app.run(
228 halt_after=final_nodes, inputs=self.burr_inputs
229 )
230
231 return self._convert_state_from_burr(final_state)

Callers 2

executeMethod · 0.95
runMethod · 0.45

Calls 3

_initialize_burr_appMethod · 0.95
runMethod · 0.45

Tested by

no test coverage detected