I am not sure about this, but with all the checks that I tried, if the user does not enter today or something else, Watson will not recognize it, but, I believe, we can do something with the code. Someone working with IBM Watson will probably answer you correctly.
But in my basic knowledge:
Try using now () in a state and save the date inside the context variable.
Return:
yyyy-MM-dd HH:mm:ss
Use your code to get the context variable and get only the date ... after you can make conditions ...
JSON example:
{ "context": { "dateHour": "<? now() ?>" }, "output": { "text": { "values": [ "Now is $dateHour." ], "selection_policy": "sequential" } } }
I study all the documentation about system objects in Watson and I don’t see anything about data retrieval if the user doesn’t request it, but as I say, maybe someone working at IBM will answer, I'm just trying to help you with my basic knowledge .
Check out the documentation for this project @sys-date now() here .
source share