clofus/clofus-chatbot

How to used the trained models

wzpan opened this issue · 4 comments

wzpan commented

Hello, I've trained and tested the robot and they are satisfying.

Now how to used them in my product? Is there any restful API reference?

wzpan commented

I got it. Here's the API URLs' curl examples:

  • rasa-nlu parse:
curl -XPOST IP:PORT/conversations/default/parse -d '{"query":"hello"}'
wzpan commented

I still have a problem: how to get the response templates?

wzpan commented

Seems like I don't need to call the above rasa-nlu api.

Simply call the clofus API with headers {'Content-Type':'application/x-www-form-urlencoded'} works. For example:

curl http://IP:PORT/api/v1/conversations/default/parse?id=ID --header '{"Content-Type":"application/x-www-form-urlencoded"}' -d '{"query":"hello"}'