Types#

The Types module contains a set of basic data types that are used to define the expected input and output of various components of the framework. The types defined in this module include basic data types such as strings and lists, as well as more complex types that are specific to the framework.

LabelType#

Label can be a casual string or Keywords.

alias of Union[str, Keywords]

NodeLabel1Type#

Label type for transitions can be [node_name, transition_priority].

alias of Tuple[str, float]

NodeLabel2Type#

Label type for transitions can be [flow_name, node_name].

alias of Tuple[str, str]

NodeLabel3Type#

Label type for transitions can be [flow_name, node_name, transition_priority].

alias of Tuple[str, str, float]

NodeLabelTupledType#

Label type for transitions can be one of three different types.

alias of Union[Tuple[str, float], Tuple[str, str], Tuple[str, str, float]]

NodeLabelType#

Label type for transitions can be one of three different types.

alias of Union[Callable, Tuple[str, float], Tuple[str, str], Tuple[str, str, float], str]

ConditionType#

Condition type can be only Callable.

alias of Callable

ModuleName: typing_extensions.TypeAlias = 'str'#

Module name names addon state, or your own module state. For example module name can be “dff_context_storages”.

class ActorStage(value)[source]#

Bases: Enum

The class which holds keys for the handlers. These keys are used for the actions of Actor. Each stage represents a specific step in the conversation flow. Here is a brief description of each stage.

CONTEXT_INIT = 1#

This stage is used for the context initialization. It involves setting up the conversation context.

GET_PREVIOUS_NODE = 2#

This stage is used to retrieve the previous node.

REWRITE_PREVIOUS_NODE = 3#

This stage is used to rewrite the previous node. It involves updating the previous node in the conversation history to reflect any changes made during the current conversation turn.

RUN_PRE_TRANSITIONS_PROCESSING = 4#

This stage is used for running pre-transitions processing. It involves performing any necessary pre-processing tasks.

GET_TRUE_LABELS = 5#

This stage is used to retrieve the true labels. It involves determining the correct label to take based on the current conversation context.

GET_NEXT_NODE = 6#

This stage is used to retrieve the next node in the conversation flow.

REWRITE_NEXT_NODE = 7#

This stage is used to rewrite the next node. It involves updating the next node in the conversation flow to reflect any changes made during the current conversation turn.

RUN_PRE_RESPONSE_PROCESSING = 8#

This stage is used for running pre-response processing. It involves performing any necessary pre-processing tasks before generating the response to the user.

CREATE_RESPONSE = 9#

This stage is used for response creation. It involves generating a response to the user based on the current conversation context and any pre-processing performed.

FINISH_TURN = 10#

This stage is used for finishing the current conversation turn. It involves wrapping up any loose ends, such as saving context, before waiting for the user’s next input.