Rasa nlu server failure

孤者浪人 提交于 2019-12-11 15:11:11

问题


I started the rasa server by typing this command in cmd:

  rasa run --enable-api -m models/(my_model).tar.gz --cors "*" --debug

I put this command in another cmd:

  curl -X POST localhost:5005/model/parse -d '{"text":"hello"}'

After that I got this error:

  {"version":"1.2.2","status":"failure","message":"An unexpected error occurred. Error: Failed when parsing body as json","reason":"ParsingError","details":{},"help":null,"code":500}

Any help? How can I integrate Rasa with Node.js?


回答1:


Please try

 curl -H "Content-Type: application/json"  -X POST -d '{"sender":"y1mLd","message":"hi"}' http://localhost:5005/webhooks/rest/webhook

Output would be

[{"recipient_id":"y1mLd","text":"Welcome, Please let me know how I could be a help today!"}]

Hope this helps!




回答2:


Simple curl without method type worked for me:

curl localhost:5005/model/parse -d '{"text":"hello"}'


来源:https://stackoverflow.com/questions/57569758/rasa-nlu-server-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!