rasa/core/actions/action.py
async def _utter_responses(responses: List[Dict[Text, Any]],
                               dispatcher: 'Dispatcher',
                               tracker: 'DialogueStateTracker'
                               ) -> None:
        """Use the responses generated by the action endpoint and utter them.

        Uses the normal dispatcher to utter the responses from the action
        endpoint."""

        for response in responses:
            if "template" in response:
                kwargs = response.copy()
                del kwargs["template"]
                draft = await dispatcher.nlg.generate(
                    response["template"],
                    tracker,
                    dispatcher.output_channel.name(),
                    **kwargs)
                if not draft:
                    continue

                del response["template"]
            else:
                draft = {}

            if "buttons" in response:
                if "buttons" not in draft:
                    draft["buttons"] = []
                draft["buttons"].extend(response["buttons"])
                del response["buttons"]

            draft.update(response)
            await dispatcher.utter_response(draft)
Use the responses generated by the action endpoint and utter them.

        Uses the normal dispatcher to utter the responses from the action
        endpoint.
Use the responses generated by the action endpoint and utter them.
Uses the normal dispatcher to utter the responses from the action
endpoint.
Use the responses generated by the action endpoint and utter them . Uses the normal dispatcher to utter the responses from the action endpoint .
async def _utter_responses(responses: List[Dict[Text, Any]],
                               dispatcher: 'Dispatcher',
                               tracker: 'DialogueStateTracker'
                               ) -> None:
        for response in responses:
            if "template" in response:
                kwargs = response.copy()
                del kwargs["template"]
                draft = await dispatcher.nlg.generate(
                    response["template"],
                    tracker,
                    dispatcher.output_channel.name(),
                    **kwargs)
                if not draft:
                    continue
                del response["template"]
            else:
                draft = {}
            if "buttons" in response:
                if "buttons" not in draft:
                    draft["buttons"] = []
                draft["buttons"].extend(response["buttons"])
                del response["buttons"]
            draft.update(response)
            await dispatcher.utter_response(draft)
async def _utter_responses ( responses : List [ Dict [ Text , Any ] ] , dispatcher : 'Dispatcher' , tracker : 'DialogueStateTracker' ) -> None : for response in responses : if "template" in response : kwargs = response . copy ( ) del kwargs [ "template" ] draft = await dispatcher . nlg . generate ( response [ "template" ] , tracker , dispatcher . output_channel . name ( ) , ** kwargs ) if not draft : continue del response [ "template" ] else : draft = { } if "buttons" in response : if "buttons" not in draft : draft [ "buttons" ] = [ ] draft [ "buttons" ] . extend ( response [ "buttons" ] ) del response [ "buttons" ] draft . update ( response ) await dispatcher . utter_response ( draft )
Use the responses generated by the action endpoint and utter them.
Use the responses generated by the action endpoint and utter them .
"""Use the responses generated by the action endpoint and utter them.

        Uses the normal dispatcher to utter the responses from the action
        endpoint."""
responses
List[Dict[Text, Any]]
dispatcher
'Dispatcher'
tracker
'DialogueStateTracker'