wit-ai / wit

Natural Language Interface for apps and devices
https://wit.ai/
936 stars 91 forks source link

Error "Parameter [...] isn't in the context map" when entity is not recognized #2613

Closed jBernavaPrah closed 1 year ago

jBernavaPrah commented 1 year ago

Hi! I have some trouble creating a simple check of the presence of the entity in user input. If the entity is not present (in the example below, the word "tomorrow" in the user input), works by asking to fulfil the missing entity. If the user writes something like "today/tomorrow/etc", then I have the message: Parameter reservation_range isn't in the context map.. This happens in both input modules.

What is this meaning? How can I fix this?

The complete flow is shown in the image below.

image

What I'm trying to achieve is to check if the user has written in the input information of the datetime, and based on that check, respond something or reask the user the fulfil this information with a new input.

What I'm missing here?

Below are all the module configurations: image image image image

App id if needed: 1723729534315875

Waiting for your precious info!

Thanks JBP

Barbog commented 1 year ago

Hi. Thanks for letting us know. We'll look into this and get back to you.

patapizza commented 1 year ago

Hi, I wasn't able to repro on my apps, but I was able to on your app, digging more.

Screenshot 2023-04-19 at 9 31 59 AM Screenshot 2023-04-19 at 9 35 46 AM

In your first screenshot I'm surprised to see reservation_range as the parameter missing in the message; I was expecting reservation_range_entity[0].value as missing parameter if anything.

Screenshot 2023-04-19 at 9 37 51 AM Screenshot 2023-04-19 at 9 37 57 AM

Thank you for providing your app ID. I was able to repro on your app. Digging more.

In the meantime, please note that in case the user provides a range (e.g. between 6-7pm,after tomorrow,before next week), the actual value would be under from or/and to: https://wit.ai/docs/built-in-entities/#wit_datetime

patapizza commented 1 year ago

So the response content did not update properly. We're tracking this. I've duplicated the module and reattached the new one. It works now.

Screenshot 2023-04-19 at 10 06 24 AM