where as when i write time in conversation it shows it picks it up as today’s time with todays date
why duckling is not working here? it is not picking time
thanks and regards
where as when i write time in conversation it shows it picks it up as today’s time with todays date
why duckling is not working here? it is not picking time
thanks and regards
Hi there, in your it is {time}
response, you are signaling that you want to fill the response with the value of the slot time
. However you aren’t filling that slot before. A common way to handle this situation would be a custom action that sets the time slot:
stories:
- story: tell the time
steps:
- intent: ask_time
- action: give_time
Where your custom action would grab the time and tell it to the user (or it could set the slot and use that response to tell them)
I think what you are missing is that Duckling is a library to parse times from user inputs (like in your second example), not an API to grab the current time. For that you could use datetime.datetime.now()
in your custom action.