dazu.components.dialogue package

Submodules

dazu.components.dialogue.simple module

class dazu.components.dialogue.simple.SimpleDialogue(component_config: Optional[Dict[str, Any]] = None, dialog_nodes: Dict = None)

Bases: dazu.components.component.Component

classmethod load(meta: Dict[str, Any], model_dir: Optional[str] = None, model_metadata: Optional[Metadata] = None, cached_component: Optional[Component] = None, **kwargs: Any) → dazu.components.component.Component

Load this component from file. After a component has been trained, it will be persisted by calling persist. When the pipeline gets loaded again, this component needs to be able to restore itself. Components can rely on any context attributes that are created by components.Component.create() calls to components previous to this one.

classmethod name()

The name property is a function of the class - its __name__.

persist(file_name: str, model_dir: str) → Optional[Dict[str, Any]]

Persist this component to disk for future loading.

process(message: dazu.typing.message.Message, **kwargs: Any) → None

Process an incoming message. This is the components chance to process an incoming message. The component can rely on any context attribute to be present, that gets created by a call to rasa.nlu.components.Component.create() of ANY component and on any context attributes created by a call to rasa.nlu.components.Component.process() of components previous to this one.

train(training_data: dazu.typing.training_data.TrainingData, cfg: dazu.config.DazuConfig, **kwargs: Any) → None

Train this component. This is the components chance to train itself provided with the training data. The component can rely on any context attribute to be present, that gets created by a call to rasa.nlu.components.Component.create() of ANY component and on any context attributes created by a call to rasa.nlu.components.Component.train() of components previous to this one.

dazu.components.dialogue.simple.evalCondition(condition, context, intent, entities)
dazu.components.dialogue.simple.get_dialog_anythinelse(dialog_nodes)
dazu.components.dialogue.simple.get_dialog_welcome(dialog_nodes)

Module contents