Custom connector: Not getting any response from bot

Hi there,

I have created custom connector by using rasa docs and using RestInput class as template. It’s giving me empty response when I type any message in front end. I am not able to trace what exactly happening.

All message from front end are coming but response is empty from bot.

Below is my cusotm connector file: (4.0 KB)

Also find my file and I am executing only this file is it enough or do I need to run some extra commands?? (499 Bytes)

Also find my credentials file:

credentials.yml (684 Bytes)

sorry, I cannot go through your code files. I’d recommend adding some print statements to trace your message and pinpoint location where the problem is

Yeah @Ghostvv What the issue is I am getting empty array in response. And I have also checked in My file I am not getting any response from collector.messages attribute.

What does the message from the front end look like?

You could get the answer for this? I am facing exact same problem.

1 Like

Yeah below are the screenshots for reference

Making ajax rest call to bot :

Noting getting any output on success function in ajax call:

So your problem is resolved or not? Because I am not getting the solution to this issue.

Not yet. I am still struggling with this issue.

Hello Prashant,

I could get it working today. There is very small mistake in the file.

Agent.load() line has change - I just removed “/core” and it’s working fine now.

Please see below code -

from rasa.core.agent import Agent from rasa.core.interpreter import RasaNLUInterpreter from rasa.utils.endpoints import EndpointConfig

from CustomConnector import RestInput

action_endpoint = EndpointConfig(url=“http://localhost:5055/webhook”) nlu_interpreter = RasaNLUInterpreter(‘models/nlu’) agent = Agent.load(‘models’, interpreter = nlu_interpreter, action_endpoint=action_endpoint) input_channel = RestInput() agent.handle_channels([input_channel], http_port=5005, route=’/webhooks/’, cors="*")