tock / ai.tock.bot.connector.alexa

Package ai.tock.bot.connector.alexa

Alexa connector implementation. See AlexaConnector

Types

AlexaConnector

Connector for Amazon Alexa.

class AlexaConnector : ConnectorBase

AlexaConnectorCallback

The alexa connector callback.

data class AlexaConnectorCallback : ConnectorCallbackBase, SpeechletV2

AlexaInputMessage

The user message sent by Alexa.

data class AlexaInputMessage : ConnectorMessage

AlexaMessage

An alexa message.

data class AlexaMessage : ConnectorMessage

AlexaTockMapper

An Alexa model to Tock model mapper. Provided via addAlexaConnector.alexaTockMapper parameter.

open class AlexaTockMapper

Annotations

AlexaHandler

To specify ConnectorStoryHandler for Alexa connector. KClass passed as value of this annotation must have a primary constructor with a single not optional StoryHandlerDefinitionBase argument.

annotation class AlexaHandler

Properties

alexaConnectorType

The Alexa ConnectorType.

val alexaConnectorType: ConnectorType

Functions

alexaEndConversation

End the conversation with the skill.

fun alexaEndConversation(): AlexaMessage

alexaReprompt

Set a reprompt.

fun I18nTranslator.alexaReprompt(reprompt: CharSequence): AlexaMessage

alexaStandardCard

Add the specified card.

fun I18nTranslator.alexaStandardCard(title: CharSequence, text: CharSequence, smallImageUrl: String, largeImageUrl: String = smallImageUrl): AlexaMessage

endForAlexa

Sends an Alexa message as last bot answer, only if the ConnectorType of the current BotBus is alexaConnectorType.

fun <T : Bus<T>> T.endForAlexa(messageProvider: T.() -> AlexaMessage, delay: Long = defaultDelay(currentAnswerIndex)): T

sendToAlexa

Sends an Alexa message only if the ConnectorType of the current BotBus is alexaConnectorType.

fun <T : Bus<T>> T.sendToAlexa(messageProvider: T.() -> AlexaMessage, delay: Long = defaultDelay(currentAnswerIndex)): T

withAlexa

Adds an Alexa ConnectorMessage if the current connector is Alexa. You need to call BotBus.send or BotBus.end later to send this message.

fun <T : Bus<T>> T.withAlexa(messageProvider: () -> AlexaMessage): T