in functions/source/kendra_search_intent_handler_lambda/helpers.py [0:0]
def close(session_attributes, fulfillment_state, message):
"""
Get final response.
:param session_attributes: Session attributes
:param fulfillment_state: Fulfillment state
:param message: Message
:return: response to be returned by Lex chat bot
"""
response = {
'sessionAttributes': session_attributes,
'dialogAction': {
'type': 'Close',
'fulfillmentState': fulfillment_state,
'message': message
}
}
logger.info(
'<<help_desk_bot>> "Lambda fulfillment function response = %s', pprint.pformat(response,
indent=4))
return response