Frontend for chatbot

Hi I have created one chatbot using rasa-nlu and rasa-core and it works fine from the shell. Now I want to integrate this chatbot in a webpage (as a part of my assignment) but I’m unable to find any step by step tutorial on how to accomplish this, I’ve read the documentation and tried to understand and gain insights from the github page of scalableminds but to no avail.

Could someone please point me to the right direction.

Thanks Rahul

Hey @rmiiitb you can connect your bot to a frontend or website using rest API of Rasa:

I had mentioned the steps in the below post, you can refer to this post:

You can try out my custom UI: Rasa Custom UI v_2.0

Super thanks Jitesh !

However, after following the steps provided, I get the below error -

And this is what I see in my debug console -

Blockquote [2019-07-29 11:41:31 +0530] [10384] [ERROR] Exception occurred while handling uri: ‘http://localhost:5005/webhooks/rest/webhook’ Traceback (most recent call last): File “c:\users\hp\anaconda3\lib\site-packages\sanic\request.py”, line 149, in load_json self.parsed_json = loads(self.body) ValueError: Expected object or value

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “c:\users\hp\anaconda3\lib\site-packages\sanic\app.py”, line 917, in handle_request response = await response File “c:\users\hp\anaconda3\lib\site-packages\rasa\core\channels\channel.py”, line 430, in receive sender_id = await self._extract_sender(request) File “c:\users\hp\anaconda3\lib\site-packages\rasa\core\channels\channel.py”, line 395, in _extract_sender return req.json.get(“sender”, None) File “c:\users\hp\anaconda3\lib\site-packages\sanic\request.py”, line 143, in json self.load_json() File “c:\users\hp\anaconda3\lib\site-packages\sanic\request.py”, line 153, in load_json raise InvalidUsage(“Failed when parsing body as json”) sanic.exceptions.InvalidUsage: Failed when parsing body as json

Blockquote

Hey @rmiiitb try to stringify the request parameters before making the API call