Amazon Lex V2如何验证日期以及如何使用会话属性

0

【以下的问题经过翻译处理】 我正在使用Lex V2创建一个聊天机器人,它可以接受过去的日期并进行预定,所以我想要对日期进行验证,该如何实现?另外什么是会话属性,该如何使用?它是否指的是如果第一个意图是验证,则不应再为其他意图询问验证。

profile picture
EXPERT
asked 8 months ago20 views
1 Answer
0

【以下的回答经过翻译处理】 关于您的日期验证问题,您是需要按照特定的业务逻辑或格式进行验证吗?

如果您考虑在收到日期时进行业务逻辑处理,您应该使用 lambda code hook在每次调用时触发https://docs.aws.amazon.com/lexv2/latest/dg/lambda.html 然后验证日期槽何时有值。

但是如果您试图验证格式是否正确,您应该使用像 Amazon.DATE 这样的原生槽。

profile picture
EXPERT
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions