Responses#

Responses determine the response that will be sent to the user for each node of the dialog graph. Responses are used to provide the user with information, ask questions, or guide the conversation in a particular direction.

This module provides only one predefined response function that can be used to quickly respond to the user and keep the conversation flowing.

choice(responses)[source]#

Function wrapper that takes the list of responses as an input and returns handler which outputs a response randomly chosen from that list.

Parameters:

responses (List[Message]) – A list of responses for random sampling.