I want to call GET and POST webservices from my custom action how can i do that ? Any help would be really appreciated. I am using rasa core 0.12.4 and rasa nlu 0.13.8
Did you already took a look at our documentation about Actions? Apart from that you may want to look at our example restaurant bot (rasa/examples/restaurantbot at master ¡ RasaHQ/rasa ¡ GitHub). The restaurant bot does not call any other service in the end, but in the actions.py
file it defines a RestaurantAPI
class (rasa/actions.py at master ¡ RasaHQ/rasa ¡ GitHub), which could execute some API calls to other services. Does that help?
can i use Request module in python for doing REST calls ?
Yes, you can basically write any code you want in your custom actions.
ok thanks for the help
The Git link doesnât exist
Hey were you able to successfully use requests library?
I am calling api in custom action, calling it using requests library raises " requests.exceptions.ConnectionError: (âConnection aborted.â, RemoteDisconnected(âRemote end closed connection without responseâ,))" inside the action server. but when calling the API outside the action server using the same code it responds properly!, any help?
Iâm encountering the same trouble, did you get it fixed
I am facing the same issue when two concurrent conversations/users try to call API. Only second user got the response. for the first user ârequests.exceptions.ConnectionError: (âConnection aborted.â, RemoteDisconnected(âRemote end closed connection without responseâ,))â Got this Error.
Do I have to use any asychronous model for calling the API instead requests?
If yes, help me how to do this?
Please help me resolve this.
The Git link doesnât exist
Itâs now here: https://github.com/RasaHQ/rasa/tree/main/examples/formbot