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

Version: 2.2.x



nlg_response_format_spec() -> Dict[Text, Any]

Expected response schema for an NLG endpoint.

Used for validation of the response returned from the NLG endpoint.


nlg_request_format_spec() -> Dict[Text, Any]

Expected request schema for requests sent to an NLG endpoint.


nlg_request_format(template_name: Text, tracker: DialogueStateTracker, output_channel: Text, **kwargs: Any, ,) -> Dict[Text, Any]

Create the json body for the NLG json body for the request.

CallbackNaturalLanguageGenerator Objects

class CallbackNaturalLanguageGenerator(NaturalLanguageGenerator)

Generate bot utterances by using a remote endpoint for the generation.

The generator will call the endpoint for each message it wants to generate. The endpoint needs to respond with a properly formatted json. The generator will use this message to create a response for the bot.


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

Retrieve a named template from the domain using an endpoint.


| @staticmethod
| validate_response(content: Optional[Dict[Text, Any]]) -> bool

Validate the NLG response. Raises exception on failure.