gpt4 book ai didi

Alexa AMAZON.DATE 槽默认为过去的日期

转载 作者:行者123 更新时间:2023-12-03 19:33:23 25 4
gpt4 key购买 nike

我正在使用 AMAZON.DATE插槽,我希望它默认为过去的日期。

例如,如果用户说星期一,我希望它自动选择上星期一而不是下星期一。

在文档中,它确认它默认为“当前日期当天或之后”:

"Utterances that map to a specific date (such as "today", "now", or "november twenty-fifth") convert to a complete date: 2015-11-25. Note that this defaults to dates on or after the current date (see below for more examples)."



对于我的应用程序, future 的日期没有任何意义,因此手动对其进行编程不会太困难,但我只是想知道是否还有其他方法可以做到这一点?

最佳答案

不,您无法更改内置插槽的行为,因此如果 Alexa 将用户的答案解析为日期 - 在将其传递给您的进一步处理之前,只需从解析值中减去 7。它会给你过去的日期。

关于Alexa AMAZON.DATE 槽默认为过去的日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52019140/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com