Chatbot_Ra
(Chatbot_Ra)
January 24, 2020, 8:41am
1
Hi
Disclaimer: I’m not an expert in the following topic!
Currently I am running my bot with SocketIO. To start the bot, I open the following terminals in pycharm and run this:
Terminal 1:
rasa train
Terminal 2:
rasa run --endpoints endpoints.yml --credentials credentials.yml --cors "*"
Terminal 3:
rasa run actions --actions actions
Terminal 4:
livereload
Afterwards the bots starts to run in my browser with a nice user interface.
My question:
Now, I have to change to REST API. How can I do this?
What I know so far:
In the docu it says that I have to ensure my credentials.yml
has the following content: (see link)
However, what else do I need to change? You can give me a step-by-step description please?
Hope you can help me!
Mappi
(Jasper)
January 24, 2020, 9:06am
2
You don’t need to configure anything differently in rasa (just mentioning in the credentials that you are using rest is fine).
For your frontend, you would need to change it to make post requests to the server of rasa. That seems to be about it.
Hi @Chatbot_Ra
One way would be to create a custom action in which you can make requests to the rasa webhook server. For API calls, you can send requests to “http://localhost:5005/webhooks/rest/webhook ” in that custom action.
I have used API in django and hence have just a little idea about the rasa http api.
Mappi
(Jasper)
January 24, 2020, 9:33am
4
@varunsapre10 I don’t get what you mean with this. He’s switching channels, the action server is irrelevant.
@Mappi @Chatbot_Ra
I misunderstood the issue. I thought you were just trying to interact with an API.
Chatbot_Ra
(Chatbot_Ra)
January 24, 2020, 9:43am
6
Thank you both to @Mappi and @varunsapre10 .
I just learned, that all I have to do, is to change the logic. At the moment, when I sent “hello” to the bot, it says sth. like “sorry, I did not understand you”.
Apperantly, you can use this site to interact with the bot. However, it doens’t work! I need to change the logic that in order to make this work.
Do not realy know where to start
Hey @Chatbot_Ra if you are trying to switch from Socket.io to Rest API check out this widget:
https://github.com/JiteshGaikwad/Chatbot-Widget.git
Chatbot_Ra
(Chatbot_Ra)
January 24, 2020, 9:58am
8
Stupid question, but what is this? Is this a frontend which uses REST api?
At the moment I am using a frontend called index.hml
Can I just replace it with the one from the link?
Sorry, I’m absolutly no expert in this!
Chatbot_Ra
(Chatbot_Ra)
January 24, 2020, 12:00pm
9
I will close this chat in order to reprahse my question. Thinks have changed. Sorry for confusions!
@Chatbot_Ra this is frontend which uses REST api.
1 Like