Skip to main content

module aixplain.modules.pipeline.designer.mixins


class LinkableMixin

Linkable mixin class, this class will be used to link the output of the node to the input of another node.

This class will be used to link the output of the node to the input of another node.


link(
to_node: Node,
from_param: Union[str, Param],
to_param: Union[str, Param]
) → Link

Link the output of the node to the input of another node. This method will link the output of the node to the input of another node.

:param to_node: the node to link to the output :param from_param: the output parameter or the code of the output parameter :param to_param: the input parameter or the code of the input parameter :return: the link


class RoutableMixin

Routable mixin class, this class will be used to route the input data to different nodes based on the input data type.


method route

route(*params: Param) → Node

Route the input data to different nodes based on the input data type. This method will automatically link the input data to the output data of the node.

:param params: the output parameters :return: the router node


class OutputableMixin

Outputable mixin class, this class will be used to link the output of the node to the output node of the pipeline.


method use_output

use_output(param: Union[str, Param]) → Node

Use the output of the node as the output of the pipeline. This method will automatically link the output of the node to the output node of the pipeline.

:param param: the output parameter or the code of the output parameter :return: the output node