rivescript-python icon indicating copy to clipboard operation
rivescript-python copied to clipboard

Drive a conversation

Open agrawal-mohit opened this issue 6 years ago • 1 comments

The current script design let's you program a response for a given user message. There are scenarios where

  1. The bot might be required to send a proactive message
  2. The reply from the bot may not be dependent on the user input but have to be sequenced. Ex - questionnaires.

Is there a way to do this ?

Thanks for your suggestions.

agrawal-mohit avatar Mar 28 '18 11:03 agrawal-mohit

Hi @agrawal-mohit,

I am the current maintainer of Rivescript-PHP (not this package) but I asked the maintainer the same question. To answer your question 1 I asked, "What if you would use Rivescript on a website for a customer support section and you want the bot to say hell how can I help you?" when the chatbot is engaged.

Well, the current Rivescript definition is a lurker approach but you can get around this. If you initialize your Rivescript instance (in Python or PHP) you can just call reply() with a pre-configured response. for example

+ welcome
- Hi how can I help you?

And then when you call reply on your instance send "welcome" trough to the bot. It will automatically reply with "Hi how can I help you?".

johnnymast avatar Feb 13 '22 22:02 johnnymast