Version: 3.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.