MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / execute_graph

Method execute_graph

workflow/graph.py:126–136  ·  view source on GitHub ↗

Convenience method to execute a graph with a task prompt.

(
        cls,
        graph: GraphContext,
        task_prompt: Any,
        *,
        cancel_event: Optional[threading.Event] = None,
    )

Source from the content-addressed store, hash-verified

124
125 @classmethod
126 def execute_graph(
127 cls,
128 graph: GraphContext,
129 task_prompt: Any,
130 *,
131 cancel_event: Optional[threading.Event] = None,
132 ) -> "GraphExecutor":
133 """Convenience method to execute a graph with a task prompt."""
134 executor = cls(graph, cancel_event=cancel_event)
135 executor._execute(task_prompt)
136 return executor
137
138 def _execute(self, task_prompt: Any):
139 self._raise_if_cancelled()

Callers 3

mainFunction · 0.80
run_workflowFunction · 0.80
executeMethod · 0.80

Calls 1

_executeMethod · 0.45

Tested by

no test coverage detected