Executor
Attributes
attributeid= uuid4()attributeexecution_id= execution_id or uuid4()attributemax_iterations= max_iterationsattributeregistry= registryattributestate_storage= state_storageattributellm= llmattributenode_actor= node_actorattributestatus= ExecutorStatus.IDLEattributeiteration_count= 0attributeparent_executor= parent_executorattributechild_executorsdict[UUID, Executor]= {}attributelogger= logging.LoggerAdapter(logger, {'execution_id': str(self.execution_id)})attributeis_childboolFunctions
func__init____init__(self, /, registry, state_storage, node_actor, llm, *, execution_id=None, max_iterations=10, parent_executor=None, root_output_queue=None) -> NoneparamselfparamregistryRegistryparamstate_storageStateStorageparamnode_actorNodeActor[T]paramllmBaseChatModelparamexecution_idUUID | None= Noneparammax_iterationsint= 10paramparent_executorExecutor | None= Noneparamroot_output_queueQueue[ExecutorOutput] | None= NoneReturns
Nonefuncstepstep(self, /, input_) -> ExecutorOutputExecute a single step in the executor
Args: input_: ExecutorInput containing current input and target
paramselfparaminput_ExecutorInputReturns
ExecutorOutputfunc_process_input_loop_process_input_loop(self) -> NoneparamselfReturns
Nonefunc_on_exit_input_loop_on_exit_input_loop(self, /, task) -> NoneparamselfparamtaskTask[None]Returns
Nonefunc_execute_node_execute_node(self, /, input_) -> AnyExecute the node with the given input
Args: input_: ExecutorInput containing current input and target
paramselfparaminput_ExecutorInputReturns
Anyfunc_handle_next_nodes_handle_next_nodes(self, /, input_, result) -> NoneHandle the next nodes based on the execution result
Args: result: Result of the node execution input_: ExecutorInput containing current input and target
paramselfparaminput_ExecutorInputparamresultAnyReturns
Nonefunc_handle_sequential_execution_handle_sequential_execution(self, /, next_node_tuple, context=None) -> NoneHandle sequential execution of the next node
paramselfparamnext_node_tupleNextNodeparamcontextdict[str, Any] | None= NoneReturns
Nonefunc_handle_parallel_execution_handle_parallel_execution(self, /, next_nodes, context=None) -> NoneHandle parallel execution of multiple nodes
paramselfparamnext_nodeslist[NextNode]paramcontextdict[str, Any] | None= NoneReturns
Nonefunc_fork_executor_fork_executor(self, /, node) -> ExecutorCreate child executor for the given node
paramselfparamnodeBaseNode[S, NS]Returns
ExecutorLast updated on