问题
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