rasa-x - 需要一个“文本”参数来解析小鸭 rasa x
问题描述
我正在尝试在本地运行小鸭。所以在这篇文章的帮助下,我安装了堆栈,然后
克隆小鸭代码
git clone https://github.com/facebook/duckling.git
下载 zoneinfo 并更新exe/ExampleMain.hs中的参考
let defaultPath = "duckling/exe/zoneinfo/"
let fallbackPath = "exe/zoneinfo/"
使用构建
stack build
然后使用
stack exec duckling-example-exe
现在,如果我在邮递员中使用请求类型 POST 和以下内容点击http://localhost:8000/parse
{
"text": "tommorow",
"locale": "de_DE",
"tz": "Europe/Berlin",
"dims": [
"time"
],
"reftime": 1616571265000
}
表明422 bad input
Need a 'text' parameter to parse
如果我再次点击相同的请求,它会显示200 OK
quack!
有什么帮助吗?
解决方案
我看到您正在尝试将请求作为 JSON 发送,但是,“http://localhost:8000/parse”端点希望输入作为“表单编码”数据发送。
请参阅此图像以获取示例快照 - https://i.stack.imgur.com/Cqdz4.png
推荐阅读
- python - 打开 python 文件时看不到我的 python 脚本的代码。该怎么办?
- python - 如何汇总数据框中的条目?
- java - 带有自定义 @Query 注释的 Spring-Data 弹性搜索存储库计数不起作用“预期 1,但找到 30 个结果”
- c# - 如果窗口靠近右下角,GetWindowRect 返回错误值
- regex - 如何在数组公式中进行多次搜索?
- verilog - 如何在 Synopsys VCS 中将比特爆破信号转储到 vcd
- python - 带有装饰器的 Python 客户端身份验证
- mysql - 提高此查询的效率:使用联接和子查询进行更新
- python - 数据库表不是 JSON 可序列化的
- java - 我们如何通过不完整的名称找到产品或类别?