0

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

    rasa run --enable-api -m models/(name of my package).tar

and then in other cmd window typed:

    curl localhost:5005/model/parse -d ‘{“text”:“hello”}’

after that I got an error:

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

What is the reason for it? what should I change to get the normal(200) output?

moreni123
  • 23
  • 5
  • It seems to be a duplicate problem! Please look here https://stackoverflow.com/questions/57569758/rasa-nlu-server-failure/57867760#57867760 – neel Sep 10 '19 at 09:27

2 Answers2

1

can you please try this and see whether it works.

rasa run -m models --enable-api --cors ‘*’ --debug
Dushan
  • 1,365
  • 20
  • 26
0

CURL POST Request (Mac and Ubuntu):

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

Note : for windows you need to remove the quotes

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

Output

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

neel
  • 572
  • 4
  • 17