Ich habe kürzlich an einem Lex-Projekt gearbeitet. Mein Projekt benötigt dynamische Inhalte im Inhaltstyp, aber ich kann das nicht herausfinden.Wie man contentType dynamisch in aws macht Lex
Meine aktuelle Erfüllung ist:
"I can help you with : 1. Book a hotel 2. Book a car. What would you like me to do?"
Was ich sucht ist:
"I can help you with:
1. Book a hotel
2. Book a car.
What would you like me to do?"
ich mit folgendem Code versucht:
def HelpMsg(intent_request, intent_name):
if intent_name == 'HelpMsg':
response = {
'dialogAction': {
'type': 'Close',
'fulfillmentState': 'Fulfilled',
'message': {'contentType': 'Plaintext', 'content': 'I can help you with '
'\n1. Book a hotel '
'\n2. Book a car'
'\nWhat would you like me to do?'}
}}
return response
Lassen Sie mich wissen, ob dies möglich ist, tun Sie dies.
Dank