mindmeld.components.custom_action module

exception mindmeld.components.custom_action.CustomActionException[source]

Bases: Exception

class mindmeld.components.custom_action.CustomAction(name: str, config: dict, merge: bool = True)[source]

Bases: object

This class allows the client to send Request and Responder to another server and return the
the directives and frame in the response.
get_json_payload(request, responder)[source]
invoke(request, responder, async_mode=False)[source]

Invoke the custom action with Request and Responder and return True if the action is executed successfully, False otherwise. Upon successful execution, we update the Frame and Directives of the Responder object.

Parameters:
  • request (Request) --
  • responder (DialogueResponder) --
  • async_mode (bool) --
Returns:

(bool)

invoke_async(request, responder)[source]

Asynchronously invoke the custom action with Request and Responder and return True if the action is executed successfully, False otherwise. Upon successful execution, we update the Frame and Directives of the Responder object.

Parameters:
  • request (Request) --
  • responder (DialogueResponder) --
Returns:

(bool)

post(json_data)[source]
post_async(json_data)[source]
class mindmeld.components.custom_action.CustomActionSequence(actions, config, merge=True)[source]

Bases: object

This class implements a sequence of custom actions

invoke(request, responder)[source]
invoke_async(request, responder)[source]
mindmeld.components.custom_action.invoke_custom_action(name, config, request, responder, merge=True)[source]
mindmeld.components.custom_action.invoke_custom_action_async(name, config, request, responder, merge=True)[source]