tkelch
tkelch

Reputation: 321

How to create open-ended slot in lex

I'd like to create a notes/feedback field in my Lex bot, but it appears difficult to do.

It seems like AMAZON.LITERAL used to do this, and current suggestions are to create a custom slot and pump a bunch of random data into it (http://docs.aws.amazon.com/lex/latest/dg/gl-guidelines.html - bullet point 3 and other googles).

Is this the best way to do it? Does anyone know of any examples or methods to better show how this can be done?

Upvotes: 4

Views: 983

Answers (1)

sid8491
sid8491

Reputation: 6800

In my case, feeding random data to the slot did not work. It used to capture only a part of input for the slot or most of the time it assigns NULL to the slot.

To solve this problem, I just made a slot without any data and in the DialogCodeHook I assigned the inputTranscript data into the slot.

slots = intent_request['currentIntent']['slots']
slots['your_slot'] = intent_request['inputTranscript']

Please comment/answer if you find a better way to do this.

Upvotes: 4

Related Questions