Hello I am working on a pretty simple Lex V2 bot that recommends movies based off of the slot genre
and the connected lambda function hitting an API and returning the top 5 in the genre.
In Lex:
One of my utterances is "Suggest a good {genre} movie". When I type that in to test the bot, it responds with "Intent RecommendMovieIntent is fulfilled"
Output of Lex JSON:
**{
"botAliasId": "TSTALIASID",
"botId": "770QE6HMIH",
"localeId": "en_US",
"text": "Suggest a good horror movie",
"sessionId": "221398301550540"
}
{
"sessionState": {
"dialogAction": {
"type": "Close"
},
"intent": {
"name": "RecommendMovieIntent",
"slots": {
"genre": {
"value": {
"originalValue": "horror",
"interpretedValue": "Horror",
"resolvedValues": [
"Horror"
]
}
}
},
"state": "ReadyForFulfillment",
"confirmationState": "None"
},
"sessionAttributes": {},
"originatingRequestId": "ef5552bd-c4ad-43dd-a34c-ef6a134e42cf"
},
"interpretations": [
{
"nluConfidence": {
"score": 1
},
"intent": {
"name": "RecommendMovieIntent",
"slots": {
"genre": {
"value": {
"originalValue": "horror",
"interpretedValue": "Horror",
"resolvedValues": [
"Horror"
]
}
}
},
"state": "ReadyForFulfillment",
"confirmationState": "None"
},
"interpretationSource": "Lex"
},
{
"intent": {
"name": "FallbackIntent",
"slots": {}
},
"interpretationSource": "Lex"
}
],
"sessionId": "221398301550540"
}**
And here is the response from my Lambda:
**Test Event Name
MovieRecommendationEvent
Response
{
"sessionState": {
"dialogAction": {
"type": "Delegate"
},
"intent": {
"confirmationState": "Confirmed",
"name": "RecommendMovieIntent",
"state": "ReadyForFulfillment"
},
"sessionAttributes": {}
},
"messages": [
{
"contentType": "PlainText",
"content": "Here are some popular Horror movies: \nThe OctoGames\nThe Exorcism of Hannah Stevenson\nDeep Fear\nHaunting of the Queen Mary\nThe Farm"
}
],
"requestAttributes": {}
}
Function Logs
START RequestId: f0f00b2d-e28f-411c-9060-913823e0e846 Version: $LATEST
[INFO] 2024-02-09T20:46:16.185Z f0f00b2d-e28f-411c-9060-913823e0e846 Received genre: Horror
END RequestId: f0f00b2d-e28f-411c-9060-913823e0e846
REPORT RequestId: f0f00b2d-e28f-411c-9060-913823e0e846 Duration: 48.48 ms Billed Duration: 49 ms Memory Size: 128 MB Max Memory Used: 50 MB
Request ID
f0f00b2d-e28f-411c-9060-913823e0e846**
Does anyone know why this may be happening?