5.0.0 • Published 7 years ago

@datafire/amazonaws_runtime_lex v5.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

@datafire/amazonaws_runtime_lex

Client library for Amazon Lex Runtime Service

Installation and Usage

npm install --save @datafire/amazonaws_runtime_lex
let amazonaws_runtime_lex = require('@datafire/amazonaws_runtime_lex').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

amazonaws_runtime_lex.PostContent({
  "botName": "",
  "botAlias": "",
  "userId": "",
  "inputStream": ""
}).then(data => {
  console.log(data);
});

Description

Amazon Lex provides both build and runtime endpoints. Each endpoint provides a set of operations (API). Your conversational bot uses the runtime API to understand user utterances (user input text or voice). For example, suppose a user says "I want pizza", your bot sends this input to Amazon Lex using the runtime API. Amazon Lex recognizes that the user request is for the OrderPizza intent (one of the intents defined in the bot). Then Amazon Lex engages in user conversation on behalf of the bot to elicit required information (slot values, such as pizza size and crust type), and then performs fulfillment activity (that you configured when you created the bot). You use the build-time API to create and manage your Amazon Lex bot. For a list of build-time operations, see the build-time API, .

Actions

PostContent

amazonaws_runtime_lex.PostContent({
  "botName": "",
  "botAlias": "",
  "userId": "",
  "inputStream": ""
}, context)

Input

  • input object
    • botName required string
    • botAlias required string
    • userId required string
    • inputStream required BlobStream

Output

PostText

amazonaws_runtime_lex.PostText({
  "botName": "",
  "botAlias": "",
  "userId": "",
  "inputText": ""
}, context)

Input

  • input object
    • botName required string
    • botAlias required string
    • userId required string
    • inputText required Text
    • requestAttributes StringMap
    • sessionAttributes StringMap

Output

Definitions

Accept

  • Accept string

AttributesString

  • AttributesString string

BadGatewayException

  • BadGatewayException object: Either the Amazon Lex bot is still building, or one of the dependent services (Amazon Polly, AWS Lambda) failed with an internal service error.

BadRequestException

  • BadRequestException object: Request validation failed, there is no usable message in the context, or the bot build failed, is still in progress, or contains unbuilt changes.

BlobStream

  • BlobStream string

BotAlias

  • BotAlias string

BotName

  • BotName string

Button

ButtonTextStringWithLength

  • ButtonTextStringWithLength string

ButtonValueStringWithLength

  • ButtonValueStringWithLength string

ConflictException

  • ConflictException object: Two clients are using the same AWS account, Amazon Lex bot, and user ID.

ContentType

  • ContentType string (values: application/vnd.amazonaws.card.generic)

DependencyFailedException

  • DependencyFailedException object: One of the dependencies, such as AWS Lambda or Amazon Polly, threw an exception. For example, If Amazon Lex does not have sufficient permissions to call a Lambda function. If a Lambda function takes longer than 30 seconds to execute. If a fulfillment Lambda function returns a Delegate dialog action without removing any slot values.

DialogState

  • DialogState string (values: ElicitIntent, ConfirmIntent, ElicitSlot, Fulfilled, ReadyForFulfillment, Failed)

ErrorMessage

  • ErrorMessage string

GenericAttachment

HttpContentType

  • HttpContentType string

IntentName

  • IntentName string

InternalFailureException

  • InternalFailureException object: Internal service error. Retry the call.

LimitExceededException

  • LimitExceededException object: Exceeded a limit.

LoopDetectedException

  • LoopDetectedException object: This exception is not used.

MessageFormatType

  • MessageFormatType string (values: PlainText, CustomPayload, SSML, Composite)

NotAcceptableException

  • NotAcceptableException object: The accept header in the request does not have a valid value.

NotFoundException

  • NotFoundException object: The resource (such as the Amazon Lex bot or an alias) that is referred to is not found.

PostContentRequest

  • PostContentRequest object

PostContentResponse

PostTextRequest

PostTextResponse

RequestTimeoutException

  • RequestTimeoutException object: The input speech is too long.

ResponseCard

  • ResponseCard object: If you configure a response card when creating your bots, Amazon Lex substitutes the session attributes and slot values that are available, and then returns it. The response card can also come from a Lambda function ( dialogCodeHook and fulfillmentActivity on an intent).

String

  • String string

StringMap

StringUrlWithLength

  • StringUrlWithLength string

StringWithLength

  • StringWithLength string

Text

  • Text string

UnsupportedMediaTypeException

  • UnsupportedMediaTypeException object: The Content-Type header (PostContent API) has an invalid value.

UserId

  • UserId string

genericAttachmentList

listOfButtons

  • listOfButtons array
5.0.0

7 years ago

4.0.0

8 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago