- Le plus récent
- Le plus de votes
- La plupart des commentaires
Hello
The above error occurs when “intent” has not been specified for closing in the session state. When we specify the type option as “Close”, it ends the specified intent fulfillment process. To close, we need to specify the intent in the lambda response that needs to be closed. Please add the intent in the session state using the syntax in https://docs.aws.amazon.com/lexv2/latest/dg/lambda-common-structures.html#lambda-intent .
Hi Divya003, I am getting the same error after adding the intent: lex_response = { "sessionState": { "dialogAction": { "type": "Close", "fulfillmentState": "Fulfilled", "intent": { "name": "FallbackIntent" }, "message": { "contentType": "SSML", "content": f"<speak><audio src='{audio_url}'/></speak>" } } } }
The one that I got working for me (up to some extent of the format that I expected) is this one:
lex_response = {
"messages": [
{
"contentType": "SSML",
"content": f"<speak><audio src='{audio_url}'/></speak>",
"type": "unstructured"
},
{
"contentType": "PlainText",
"content": response["answer"],
"type": "unstructured"
}
],
"sessionState": {
"dialogAction": {
"type": "ElicitIntent"
}
}
}
Contenus pertinents
- demandé il y a 2 mois
- demandé il y a 7 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
Hi Divya003, I am getting the same error after adding the intent: lex_response = { "sessionState": { "dialogAction": { "type": "Close", "fulfillmentState": "Fulfilled", "intent": { "name": "FallbackIntent" }, "message": { "contentType": "SSML", "content": f"<speak><audio src='{audio_url}'/></speak>" } } } }