module aixplain.modules.pipeline.designer.base
Global Variables
- TYPE_CHECKING
class Serializable
method serialize
serialize() → dict
class Param
Param class, this class will be used to create the parameters of the node.
method __init__
__init__(
code: str,
data_type: Optional[DataType] = None,
value: Optional[str] = None,
node: Optional[ForwardRef('Node')] = None,
param_type: Optional[ParamType] = None
)
method attach_to
attach_to(node: 'Node') → Param
Attach the param to the node. :param node: the node :return: the param
method back_link
back_link(from_param: 'Param') → Param
Link the input of the param to the output of another param. :param from_param: the output param :return: the param
method link
link(to_param: 'Param') → Param
Link the output of the param to the input of another param. :param to_param: the input param :return: the param
method serialize
serialize() → dict
class InputParam
method __init__
__init__(*args, is_required: bool = True, **kwargs)
method attach_to
attach_to(node: 'Node') → Param
Attach the param to the node. :param node: the node :return: the param
method back_link
back_link(from_param: 'Param') → Param
Link the input of the param to the output of another param. :param from_param: the output param :return: the param
method link
link(to_param: 'Param') → Param
Link the output of the param to the input of another param. :param to_param: the input param :return: the param
method serialize
serialize() → dict
class OutputParam
method __init__
__init__(
code: str,
data_type: Optional[DataType] = None,
value: Optional[str] = None,
node: Optional[ForwardRef('Node')] = None,
param_type: Optional[ParamType] = None
)
method attach_to
attach_to(node: 'Node') → Param
Attach the param to the node. :param node: the node :return: the param
method back_link
back_link(from_param: 'Param') → Param
Link the input of the param to the output of another param. :param from_param: the output param :return: the param
method link
link(to_param: 'Param') → Param
Link the output of the param to the input of another param. :param to_param: the input param :return: the param
method serialize
serialize() → dict
class Link
Link class, this class will be used to link the output of the node to the input of another node.
method __init__
__init__(
from_node: 'Node',
to_node: 'Node',
from_param: Union[Param, str],
to_param: Union[Param, str],
pipeline: 'DesignerPipeline' = None
)
method attach_to
attach_to(pipeline: 'DesignerPipeline')
Attach the link to the pipeline. :param pipeline: the pipeline
method auto_infer
auto_infer()
method serialize
serialize() → dict
method validate
validate()
class ParamProxy
method __init__
__init__(node: 'Node', *args, **kwargs)
method add_param
add_param(param: Param) → None
method create_param
create_param(
code: str,
data_type: DataType = None,
value: <built-in function any> = None,
is_required: bool = False
) → Param
method serialize
serialize() → List[dict]
method set_param_value
set_param_value(code: str, value: str) → None
method special_prompt_handling
special_prompt_handling(code: str, value: str) → None
This method will handle the special prompt handling for asset nodes having text-generation
function type.
class Inputs
method __init__
__init__(node: 'Node', *args, **kwargs)
method add_param
add_param(param: Param) → None
method create_param
create_param(
code: str,
data_type: DataType = None,
value: <built-in function any> = None,
is_required: bool = False
) → Param
method serialize
serialize() → List[dict]
method set_param_value
set_param_value(code: str, value: str) → None
method special_prompt_handling
special_prompt_handling(code: str, value: str) → None
This method will handle the special prompt handling for asset nodes having text-generation
function type.
class Outputs
method __init__
__init__(node: 'Node', *args, **kwargs)
method add_param
add_param(param: Param) → None
method create_param
create_param(
code: str,
data_type: DataType = None,
value: <built-in function any> = None,
is_required: bool = False
) → Param
method serialize
serialize() → List[dict]
method set_param_value
set_param_value(code: str, value: str) → None
method special_prompt_handling
special_prompt_handling(code: str, value: str) → None
This method will handle the special prompt handling for asset nodes having text-generation
function type.
class Node
Node class is the base class for all the nodes in the pipeline. This class will be used to create the nodes and link them together.
method __init__
__init__(
pipeline: 'DesignerPipeline' = None,
number: Optional[int] = None,
label: Optional[str] = None
)
method attach_to
attach_to(pipeline: 'DesignerPipeline')
Attach the node to the pipeline. :param pipeline: the pipeline
method build_label
build_label()
method serialize
serialize() → dict