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.
Hi
With out implemnting custom connector, i can test rasa using postman using url=http://localhost:5005/webhooks/rest/webhook. is there any default implementation
Hi @prashant_kamble, I am trying to do the same steps, but always got the error ‘Module MyIo not found’.
Can you share please the project structure or guide me, please, where to put that custom connector file?
I am happy that it helped you . If you are using custom front end with custom connector, you will need to put webhook url in front end javascript file where you will be making ajax requests to the bot.
Aaah ok! Thank you
I am making an application for a small robot to work via voice (so with ASR and TTS), so I probably need to add the webhook url to the MQ part.
Is there a way to do this without the POST request webhook thingy? I have my own connector file running now (I’ll attach it), and we want to just run it when asr receives something (which is dealt with in the zmq server side) and gives back a json file to te get_text() function with the client side of zmq, which extracts the text.
Can you little elaborate on asr and zmq server terminologies. You are recieving something using asr but what it is can you explain based on that I can suggest you.
Of course.
So, ZMQ is the message queueing part, where it has a server side, where it receives the text in a JSON file, which is the output of the Automatic Speech Recognition (ASR). The text is what the user said. The client side of ZMQ is in the connector file, which asks for input of the server side, and the server side hands the asr output to the client side. The client side then extracts the text message from the JSON file. Does this make things more clear? I added the zmq server side, with the text for now just set (so no ASR).
Currently how is your flow exactly working. Means from any other fron-end are you making post requests so the bot could get user messages. connector part will be backend processing right? that’s what I understood. But you are telling that client side of ZMQ is in the connector file I am not clear on that a little bit.
Actually at client side ASR is working and it is taking voice from user and zmq is used for that textual messages from asr.And ZMQ has user text messages and you want to take messages from zmq and make request to your custom connector and take bot response.
I am new to Rasa and this post really did help me. Thank you very much for this short tutorial. I followed all the steps but the last one gets this error: “AssertionError: A blueprint with the name “custom_webhook_RestInput” is already registered. Blueprint names must be unique.”
When I change the name of the blueprint, I get another error: “sanic.router.RouteExists: Route already registered: /webhooks/rest/ [GET]”
I have no idea what this means and I never saw anything similar in the forum.
I wrote a file channel.py, copied your MyIo.py and editied the credentials.yml like this:
rest: