Error return of buttons in rasa webchat

You can send the user text to match with the database and return the match to the button. Like we do in API calls? Let me share with you on Weather API video so that you get the idea. See How {temp} is used as a return in python: Easy 2 Call Weather API In Rasa | Innovate Yourself

go straight to: action_hello_world

The problem with this widget is that it has a home slot tb to start the bot.

@RodrigoLima That is why I told you to provide buttons and then button will trigger different actions with an if-else statement.

@RodrigoLima which one is this widget? Can you name it.

Hahahaha. I will see the video

@RodrigoLima This thread is I guess is my longest conversation thread :slight_smile:

image

I think it’s similar to what I use. I type the number and custom actions brings the information but the option with initpayload is still the best. rasa_webchat works when I modify a line in socketio.py

it seems to me that this widget does not send the button in python list format, but each item in the list

@nik202

JiteshGaikwad

At 100 we stop :joy:

@RodrigoLima Confirm me few things:

  1. You want that 1000, 2000, 3000 is a menu when the user select or type, Right?
  2. For example: If your select 1000 or click the button 2000 it will go to the database and fetch the data related to 1000 and display, Right?

If I put text as str the buttons are sent to the user, the problem is that a None is sent to each message.

  1. You want that 1000, 2000, 3000 is a menu when the user select or type, Right? No. as I told you, the idea is to have this number in the initpayload and the bot to load alone. example

Empresa.com.br/bot

cosmeticos.com.br/bot

the first one has initpayload 1000

the second 3000

then it calls the corresponding bot.

Without company 1 user seeing company 2 content

  1. For example: If your select 1000 or click the button 2000 it will go to the database and fetch the data related to 1000 and display, Right?

yes! but the user don´t choise with the buttons. he only accesses the company website

@RodrigoLima Interesting! Let me also think about this and try to understand your use case in a better way.

Means you have two bots :upside_down_face:? 1000 and 3000?

You are ok with the company website shown in the chatbot?

Means you have two bots :upside_down_face: ? 1000 and 3000? No, I only have 1 bot and several sites pointing to the same place, the same way you accessed it on ecfacil.com.br/bot There is only the socketUrl where the bot is.

I still have to learn how to do this with docker and put it in the digital ocean :joy:

Are you ok with company website shown in the chatbot? r: Sorry, I do not understand

@RodrigoLima means you just want to show websites with links in chatbot when users select or type 1000 or 2000 or 3000 etc. Right?

Means website links.

yes,

llook at this, it´s the same problem

@RodrigoLima This error you get when you return the website? How many websites do you have in total in your database?

@nik202 No, this error happens when I try to send the site buttons to the user. It’s the same error as in this topic.

the process of fetching the bot information from the database is ok. Only the error that appears in the widget rasa_webchat

I tried this: dispatcher.utter_message(buttons=[ {“payload”:"/buy", “title”: “jatka”}, ])

but the error continues

you can not send like this as a payload

For example:

   button_response=[
                  {
                      "title": "great",
                      "payload": "great"
                  },
                  {
                      "title": "super sad",
                      "payload": "super sad"
                  }
              ]

   dispatcher.utter_message(text="Hey! How are you?", buttons=button_response)

Have you tried this?

oh!!! you are my hero :joy: