IBM Watson Assistant:如何确保退房日期晚于入住日期
我正在使用 IBM Watson Assistant 创建一个酒店房间预订聊天机器人。我如何确保(可能有条件)客户输入的退房日期晚于他们输入的入住日期? Watson Assistant 中的条件只能比较相对于用户时间的日期,而不能与输入进行比较! 这里的图片流程将显示我正在处理的流程。
I am creating a hotel room booking chat bot using IBM Watson Assistant. How can I make sure (probably with conditions) that the check-out date entered by the client is after the check-in date they entered? Conditions in Watson Assistant can only compare a date relative to a user time and not to the input!
The image here process will show the process that I am working on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用上下文变量或实体。
使用上下文变量,将日期保存到上下文变量中。然后,您可以使用任何日期比较方法来比较两个日期上下文变量 - https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-methods#dialog-methods-date-time
如果您使用从输入中提取实体,那么这将是:
您还可以混合和匹配,假设您已经有 checkinDate (以及将来的)并且您已将值存储在上下文中。然后你的下一句话可能会询问结账日期,在这种情况下你的支票就会变成。
You can use context variables or entities.
With context variables, save the dates into context variables. You can then compare the two date context variables, using any of the date comparison methods - https://cloud.ibm.com/docs/assistant?topic=assistant-dialog-methods#dialog-methods-date-time
If you use entities pulled out from the input, then this will be:
You can also mix and match, say you have the checkinDate already (and its in the future) and you have stashed the value in context. Then your next utterance may ask for the checkout date, in which case your check becomes.