class Api::Dialog

Overview

The Dialog facade, used to simulate dialogue rounds between the user and the action.

Included Modules

Defined in:

api/dialog.cr

Instance Method Summary

Instance methods inherited from module Bindings

call!(result)
call!(&block)
call!

Instance Method Detail

def dispose_flows(registered_flows) #

Dispose previously defined flows.


[View source]
def flow(intent_name : String, &block : Flow::IntentContinuation) #

Create a new dialog flow having a single intent as the entry point.


[View source]
def flows(*intent_descriptors) #

Create a new dialog flow having one or more intents as the entry point.


[View source]
def publish_configure(message) #

Publish a dialogue configure message.


[View source]
def publish_continue_session(message) #

Publish a continue session message.


[View source]
def publish_end_session(message) #

Publish an end session message.


[View source]
def publish_start_session(message) #

Publish a start session message.


[View source]
def subscribe_intent(*extra_args, once = false, &callback : IntentMessage -> Void) #

Subscribe to intent events.


[View source]
def subscribe_intent_not_recognized(*extra_args, once = false, &callback : IntentNotRecognizedMessage -> Void) #

Subscribe to intent_not_recognized events.


[View source]
def subscribe_intents(*extra_args, once = false, &callback : IntentMessage -> Void) #

Subscribe to intents events.


[View source]
def subscribe_session_ended(*extra_args, once = false, &callback : SessionEndedMessage -> Void) #

Subscribe to session_ended events.


[View source]
def subscribe_session_queued(*extra_args, once = false, &callback : SessionQueuedMessage -> Void) #

Subscribe to session_queued events.


[View source]
def subscribe_session_started(*extra_args, once = false, &callback : SessionStartedMessage -> Void) #

Subscribe to session_started events.


[View source]
def unsubscribe_intent(callback_ref, *extra_args) #

Unsubscribe to intent events.


[View source]
def unsubscribe_intent_not_recognized(callback_ref, *extra_args) #

Unsubscribe to intent_not_recognized events.


[View source]
def unsubscribe_intents(callback_ref, *extra_args) #

Unsubscribe to intents events.


[View source]
def unsubscribe_session_ended(callback_ref, *extra_args) #

Unsubscribe to session_ended events.


[View source]
def unsubscribe_session_queued(callback_ref, *extra_args) #

Unsubscribe to session_queued events.


[View source]
def unsubscribe_session_started(callback_ref, *extra_args) #

Unsubscribe to session_started events.


[View source]