rasa/core/nlg/callback.py
async def generate(self, template_name: Text, tracker: DialogueStateTracker,
                       output_channel: Text, **kwargs: Any) -> Dict[Text, Any]:
        """Retrieve a named template from the domain using an endpoint."""

        body = nlg_request_format(template_name,
                                  tracker,
                                  output_channel,
                                  **kwargs)

        logger.debug("Requesting NLG for {} from {}."
                     "".format(template_name, self.nlg_endpoint.url))

        response = await self.nlg_endpoint.request(
            method="post", json=body, timeout=DEFAULT_REQUEST_TIMEOUT)

        if self.validate_response(response):
            return response
        else:
            raise Exception("NLG web endpoint returned an invalid response.")
Retrieve a named template from the domain using an endpoint.
Retrieve a named template from the domain using an endpoint.
Retrieve a named template from the domain using an endpoint .
async def generate(self, template_name: Text, tracker: DialogueStateTracker,
                       output_channel: Text, **kwargs: Any) -> Dict[Text, Any]:
        body = nlg_request_format(template_name,
                                  tracker,
                                  output_channel,
                                  **kwargs)
        logger.debug("Requesting NLG for {} from {}."
                     "".format(template_name, self.nlg_endpoint.url))
        response = await self.nlg_endpoint.request(
            method="post", json=body, timeout=DEFAULT_REQUEST_TIMEOUT)
        if self.validate_response(response):
            return response
        else:
            raise Exception("NLG web endpoint returned an invalid response.")
async def generate ( self , template_name : Text , tracker : DialogueStateTracker , output_channel : Text , ** kwargs : Any ) -> Dict [ Text , Any ] : body = nlg_request_format ( template_name , tracker , output_channel , ** kwargs ) logger . debug ( "Requesting NLG for {} from {}." "" . format ( template_name , self . nlg_endpoint . url ) ) response = await self . nlg_endpoint . request ( method = "post" , json = body , timeout = DEFAULT_REQUEST_TIMEOUT ) if self . validate_response ( response ) : return response else : raise Exception ( "NLG web endpoint returned an invalid response." )
Retrieve a named template from the domain using an endpoint.
Retrieve a named template from the domain using an endpoint .
"""Retrieve a named template from the domain using an endpoint."""
self
template_name
Text
tracker
DialogueStateTracker
output_channel
Text
kwargs
Any