简体   繁体   中英

How to response @sys.time as period format in IBM Watson ?

When users said " Are you available in tomorrow morning?"

Watson will recognize "morning" as @sys-time:06:00:00 & @sys-time:12:00:00

However, when I using slot to detect @sys.time and saving it as $time, Watson only save @sys-time:06:00:00 in the context variable ($time).

I hope my chatbot can response like " Yes, I'm available in 2020-11-15 morning" or " Yes, I'm available in 2020-11-15 6:00-12:00"

Now, the way I write my response is "" Yes, I'm available in $date $time"

And my chatbot will answer "Yes, I'm available in 2020-11-15 6:00", which is not what I want it to be.

Do anyone know how to response @sys.time as period format in IBM Watson ?

Or in other thinking, how to design a bot that deal with time period?

There could be multiple ways to solve it.

Look at the concept of conditional slots . You could check how many sys-time values are returned and have a second, optional slot to capture the second time. In your response and related logic you would need to deal with having multiple values.

Only capture the date and check for the detected entities with separate logic. Note that if the users responds with "this week", you have a similar problem. The reason is that it would return the first and last day of the week.

See the expressions for accessing objects on how to work with the detected entities.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM