Call rasa_nlu http API:POST /evaluate


(Moon) #1

i have a test.

  1. train with project project=test_model: curl --request POST --header ‘content-type: application/x-yml’ -d@- --url ‘localhost:5004/train?project=test_model’
  2. use the model generated in step 1 : model_20180910-080232 to evaluate : curl -XPOST localhost:5004/evaluate?project=test_model&model=model_20180910-020832 -d @demo-rasa.json | python -mjson.tool

the error pops up:

{ “error”: “Unknown data format for file /tmp/tmp7ddx9cmp_training_data” }-d: command not found No JSON object could be decoded [1]+ Done curl -XPOST localhost:5004/evaluate?project=test_model

(Akela Drissner) #2

You’re not passing any data that NLU should train on. You need to either pass a file to -d, or a link to training data with --url Please look at the docs for explanation of these parameters

(Growing Bison) #3

I also got the same result as this. The command run in jupyter, and, the result is follows.

!curl -XPOST localhost:6001/evaluate?project=default&model=model_20190314-192302 -d @/home/io/myapp/Files/project_tutorial/nlu_rasa_demo/task_chatbot/data/data_ok_edit0314_addintent_en.json|json

/bin/sh: 1: -d: not found { “error”: “Unknown data format for file /tmp/tmpxt7mvvlt_training_data” }

When i remove “&model=model_20190314-192302” from the above command, the evaluation can be showed successfully.

!curl -XPOST localhost:6001/evaluate?project=default -d @/home/io/myapp/Files/project_tutorial/nlu_rasa_demo/task_chatbot/data/data_ok_edit0314_addintent_en.json|json