System entity date-time

49 views
Skip to first unread message

Светлана Поздеева

unread,
Jan 11, 2021, 9:15:52 AM1/11/21
to Dialogflow Essentials Edition users
Hello,

I have a problem with time period, when bot is asked to recall "tomorrow at 5". In this case, it is recognized as "2020-12-11T05:00:00+03:00", but it should be "2020-12-11T17:00:00+03:00". How to make default time parameters as in evening period?

Samar Amara

unread,
Jan 11, 2021, 12:21:48 PM1/11/21
to Dialogflow Essentials Edition users
The issue you described is similar to this one [1]


This is the intended behavior of Dialogflow, where if you are mentioning an ambiguous time without specifying AM/PM, it will return the nearest future time matched with the value.





Светлана Поздеева

unread,
Jan 12, 2021, 2:34:20 AM1/12/21
to Dialogflow Essentials Edition users
I see that this bug wouldn't fixed for non-English languages? For my language, Russian, it is not essential to specify AM/PM. For example, "call me at 6" we understand as  "call me at 18:00:00" even if now 8pm.
  
 Can you advise how to solve this problem by myself?  
понедельник, 11 января 2021 г. в 20:21:48 UTC+3, samar...@google.com:

Joaquim Suazo

unread,
Jan 14, 2021, 10:07:49 AM1/14/21
to Dialogflow Essentials Edition users
Hello,

I would add a follow-up intent as a workaround.

For example for the utterance "call me at 6" I would add a follow up intent saying "at 6 am or at 6 pm?". 

This way the ambiguity gets avoided, because in the use case you are describing there exists an ambiguity. The @sys.time format is the one it is just to avoid that, and there isn't currently any way to define a time period preference.

In your main intent I would assign the "6" as a @sys.time with the value $time.original and then the response would be "At $time.original am or at $time.original pm?" and then at the follow up intent you cant take the "6 am" or the "6 pm" as @sys.time and it automatically understands the time.

I hope it helps.
Reply all
Reply to author
Forward
0 new messages