lucas144
(Lucas Alvarez Lacasa)
May 3, 2022, 7:49am
1
Hello team!.
Is there a way to send HTML content from the bot to the frontend? I’ve used the “buttons” and the “image” fields, which let the frontend know that they should display buttons or images, but is there a way to send more custom content?
I’m using the “https://unpkg.com/@rasahq/rasa-chat ” widget.
Best.
itsjhonny
(João Pedro Guimarães)
May 3, 2022, 12:59pm
2
Hi!
You can send custom payload to your front-end using -custom
utter_bad_word:
- custom:
alt: image sad expression
image: https://i.imgur.com/CH6p1aI.png
text: Its not cool
In this case, I’m seeding to front-end image description for blind people (alt tag) but I made some changes to get this and insert in HTML.
You can send other payload like JSON but will need frontend changes to get this custom parameters
lucas144
(Lucas Alvarez Lacasa)
May 3, 2022, 1:24pm
3
Thanks for your reply!. Are you currently using any downloadable widget or you’re creating the whole frontend from scratch?
itsjhonny
(João Pedro Guimarães)
May 3, 2022, 1:29pm
4
I like to use
frontbot - rasa-webchat but you need some React.JS expertise to make this changes.
I like Chatbot-Widget too. This is a very cool widget using HTML5 + CSS + JS (jQuery). Very easy to make code customizations.
lucas144
(Lucas Alvarez Lacasa)
May 3, 2022, 1:40pm
5
That’s great. I tried using the last one, but it didn’t work with Rasa 3.1
Are you using it on the latest version of Rasa?
itsjhonny
(João Pedro Guimarães)
May 3, 2022, 1:44pm
6
I’m using 2.8.x in production with this widget, but I’m not seeing why not to work with rasa 3.1
This widget use webhook 'http://localhost:5005/webhooks/rest/webhook'
with POST calls
What’s your dev console says?