BaseNode

class BaseNode(ABC):

Base class for all nodes in the workforce.

Parameters:

  • description (str): Description of the node.
  • node_id (Optional[str]): ID of the node. If not provided, it will be generated automatically. (default: :obj:None)

init

def __init__(self, description: str, node_id: Optional[str] = None):

reset

def reset(self, *args: Any, **kwargs: Any):

Resets the node to its initial state.

set_channel

def set_channel(self, channel: TaskChannel):

Sets the channel for the node.

stop

def stop(self):

Stop the node.