gpt4 book ai didi

wit.ai - 如何在对基本小鸭服务器的调用中传递日期/时间引用?

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

关于如何将日期/时间引用传递给基本的 Vanilla 小鸭服务器的任何指示?

我正在使用小鸭来解析文本。在查找时间表达式时,我需要传入一个引用日期/时间。

引用日期/时间为我提供了“昨天”和“今天”等表达的 anchor 。

例如

引用日期 = 2018 年 4 月 1 日 => “1 周前” = 2018 年 3 月 25 日。

引用时间 = 2018 年 4 月 1 日,下午 3 点 =>“8 小时内”= 2018 年 4 月 1 日,晚上 11 点

duckling repo site有关于如何使基本服务器在本地运行的说明,然后您可以调用

curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_GB&text=tomorrow at eight'

但我能找到的例子不多。我可以在 ExampleMain.hs中看到那个 dimslang也是 text 中的参数选项和 locale ,但在引用日期没有。

最佳答案

curl -XPOST http://0.0.0.0:8000/parse --data 'locale=en_GB&text=tomorrow at eight&reftime=<unix epoch in millisecond>'

引用:

https://github.com/facebook/duckling/issues/166

关于wit.ai - 如何在对基本小鸭服务器的调用中传递日期/时间引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46840250/

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