notice

This is unreleased documentation for Rasa Open Source Documentation Master/Unreleased version.
For the latest released documentation, see the latest version (2.0.x).

Version: Master/Unreleased

rasa.core.nlg.generator

NaturalLanguageGenerator Objects

class NaturalLanguageGenerator()

Generate bot utterances based on a dialogue state.

generate

| async generate(template_name: Text, tracker: "DialogueStateTracker", output_channel: Text, **kwargs: Any, ,) -> Optional[Dict[Text, Any]]

Generate a response for the requested template.

There are a lot of different methods to implement this, e.g. the generation can be based on templates or be fully ML based by feeding the dialogue state into a machine learning NLG model.

create

| @staticmethod
| create(obj: Union["NaturalLanguageGenerator", EndpointConfig, None], domain: Optional[Domain]) -> "NaturalLanguageGenerator"

Factory to create a generator.