Convenience method to execute a graph with a task prompt.
(
cls,
graph: GraphContext,
task_prompt: Any,
*,
cancel_event: Optional[threading.Event] = None,
)
| 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() |
no test coverage detected