notice

This is documentation for Rasa Documentation v2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (3.x).

Version: 2.x

rasa.core.nlg.template

TemplatedNaturalLanguageGenerator Objects

class TemplatedNaturalLanguageGenerator(NaturalLanguageGenerator)

Natural language generator that generates messages based on templates.

The templates can use variables to customize the utterances based on the state of the dialogue.

generate

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

Generate a response for the requested template.

generate_from_slots

| generate_from_slots(template_name: Text, filled_slots: Dict[Text, Any], output_channel: Text, **kwargs: Any, ,) -> Optional[Dict[Text, Any]]

Generate a response for the requested template.