AWS Lex V2 Closing Response not working

0

Hi Team,

I have a lex V2 bot invoking a lambda function to get QnA response from Open search, I need to append / or show a closing response after the lambda fulfillment, I tried using closing response and even the success response with Fulfillment options and nothing seems to be working, every time bot returns the response from the Lambda the closing responses are not shown.

Please suggest.

  • Hi, we will be able to help you better if you can share more details abot your experience? Are you seeing an error from Lex or you are getting a response which is not expected? It can be heplful if you can share the JSON reponse that Lambda function is returning to Lex and the message configured in Closing Response.

  • Hi Saket, I am not getting any error, I am looking to append a content type message group, Currently after lambda invocation I am only getting one message and the configured closing response is not getting added. Current :

    "messages": [ { "content": "Answer.", "contentType": "PlainText" }

    Expected :

    "messages": [ { "content": "Answer.", "contentType": "PlainText" }, { "content": "Closing Response.", "contentType": "PlainText" }

  • Hey, without having sufficient information of your setup. I am guessing the fulfillment Lambda function is returning a message back and bot is only responding with that message. If you are doing so then Lex bot will only respond with the message set by the lambda. You cannot use both the message in Lambda and Closing repsonse together.

  • Hello, just wanted to follow up and see if you are still working through surfacing the closing response correctly?

    As Saket mentioned it would be good to know the below information to better help answer your questions:

    1. Where is the API response being returned? Are you testing on console, have an integration with another service that consumes the response?
    2. When you say you are invoking a lambda function to get QnA response is this a CodeHook Lambda or a Fulfillment Lambda?
    3. Are you explicitly adding both the "Answer" and "Closing Response" in the same Lambda response? - If your Lambda execution updates the "messages" field Lex will honor the value you provided and not append/change any additional messages to it.

    Thank you for your time, please let me know if I can provide any additional clarification questions.

질문됨 2년 전863회 조회
1개 답변
0

Hello AWS-User-6597632, Let us know if you still need help with your Lex V2 issue.

profile picture
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠