windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
259 stars 116 forks source link

Multiple question to the user #237

Closed fgionghi closed 2 years ago

fgionghi commented 2 years ago

Hi, all I want to do is a bot that ask the user something like this:

Every question must be answered though a keyboard, the part I don't understand is how I can receive the answer from the user and know which answer correspond to which question (because this is the problem with a receiver node: I receive the answer but to which question does that answer correspond?).

This is more evident if after each question I ask for a confirmation (eg: "Your name is **, right?). I will receive a few "Yes", but to which question? I achived the same result with an inline_keyboard thanks to the callback_query field set different for each answers, but I would like a normal keyboard.

Hope to explained myself, thank you.

windkh commented 2 years ago

Well, I see several options for how this could be solved:

  1. make use of the reply node
  2. Do question and answers using a statemachine
  3. use some AI technology that creates questions for missing slots

For the last one I saw a demo several years ago with rasa. I guess I also saw some demo using watson.

fgionghi commented 2 years ago
  1. The reply node can be useful only if the user actually reply to bot's messages (long press on the bot's message>reply>write something)? If yes I would prefer to not use this method.
  2. Can you give me more details?
  3. I don't know it seems too much to just ask 3 question

Thank you.

ozett commented 2 years ago

interesting idea, the state-machine for dialoque: push the user from state to state

https://flows.nodered.org/node/node-red-contrib-dsm

first row is linked to wikipedia explanation of state-maschine idea

windkh commented 2 years ago

I guess I can not do anything about that inside the node code. Maybe posting this in the node-red forum may provide some more response. Sorry that I can not help here but my time is limited and so many other projects are waiting for me...