aws / aws-sdk-js

AWS SDK for JavaScript in the browser and Node.js
https://aws.amazon.com/developer/language/javascript/
Apache License 2.0
7.6k stars 1.55k forks source link

Request to add slotDetails to AWS.LexRuntime.postText() and postContent() response #1911

Closed windhamg closed 6 years ago

windhamg commented 6 years ago

According to https://docs.aws.amazon.com/lex/latest/dg/built-in-slot-time.html:

Amazon Lex uses the slotDetails attribute of a Lambda event to pass resolutions for the ambiguous times to your Lambda function. For example, if your bot prompts the user for a delivery time, the user can respond by saying "10 o'clock." This time is ambiguous. It means either 10:00 AM or 10:00 PM. In this case, the value in the slots map is null, and the slotDetails entity contains the two possible resolutions of the time. Amazon Lex inputs the following into the Lambda function:

"slots": {
   "deliveryTime": null
},
"slotDetails": {
   "deliveryTime": {
      "resolutions": [
         {
            "value": "10:00"
         },
         {
            "value": "22:00"
         }
      ]
   }
}

I have exactly this situation in one of my projects, yet the AWS SDK for Javascript is not returning the slotDetails object in the response. I am using v2.188.0.

Is it possible to get the slotDetails object back when using "return parameters to client" as the fulfillment option for an Intent, rather than using a Lambda function?

If not, I would like to request that the slotDetails object be added to the AWS.LexRuntime.postText() and postContent() data objects passed to the callback.

Thanks! --Gary

AllanZhengYP commented 6 years ago

Hey @windhamg, The Lex Developer Forum would be a better place for API usage or any feature request. The service team would be happy to answer your questions.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.