I was facing issues while creating custom connector for my customized ui as well as whole functionality. But after countable amount of efforts and time I managed to implement custom connector using RestInput class template from rasa docs Custom Connectors
Below are the steps that I followed :
Create python script file and copy paste RestInput template code and fix all imports.
Below is my custom connector file :
MyIo.py (4.4 KB)
Do all custom connector related configuration in credentials.yml file
a. MyIo is the script name i.e MyIo.py
b. RestInput is the class name inside MyIo.py script file.
Run your custom action server with the usual command:
python -m rasa_sdk --actions actions
Run your rasa server using following command :
To start rasa server with cross origin access use below command:
rasa run -m models --enable-api --cors "*"
with debug mode
rasa run -m models --enable-api --cors "*" --debug
Also set environment variable path for your custom connector file like below
PYTHONPATH=“path to your custom connector file”
Note : Your webhook url will be as per the below format
In above url myio is the name of component that we are returning from name method inside of our custom connector class i.e RestInput.
After completing you can connect it with any front-end or just test it with postman rest api testing tool.