Hello there , I want to my chatbot to respond initially by welcoming message when user hit on chatbot so how can i do that . like my step 1 should be utter_greet instead of action_listen .
any suggestions and help will be greatful for me …thanks
Hello there , I want to my chatbot to respond initially by welcoming message when user hit on chatbot so how can i do that . like my step 1 should be utter_greet instead of action_listen .
any suggestions and help will be greatful for me …thanks
Hi @Beherasaptami,
how did you implement the interaction between the user and the bot? Did you use a Website with a ChatWidget, a Mobile version, … ?
Depending on the way one communicates with the bot, there are various ways to achieve, what you want. Most likely you want to trigger a greet intent by sending a first hidden input to the bot. This is a good way if your stories start with a greeting.
Sometimes it is even better to not use the bot for the first message rather than to simply show a message that leads the user to the first utterance.
As soon as we know a bit more, we could help.
Kind regards
Julian
Hey , I am using UI having chatwidget (code was written by GitHub - JiteshGaikwad/Rasa_CustomUI-v_2.0: Custom UI for Rasa)
Hi @Beherasaptami,
then why not using the send
method that was already implemented by Jitesh and trigger it on show-up with a predefined message? This would invoke the bot to respond, displaying a first message in your chat such that the first message the user types in is actually the second message the bot receives?
Kind regards
Julian
Hey , can you share me the link of send method
Hi @Beherasaptami,
of course. It’s located here
function send(message) {
console.log("User Message:", message)
$.ajax({
url: 'http://localhost:5005/webhooks/rest/webhook',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
"message": message,
"sender": "username"
}),
success: function (data, textStatus) {
setBotResponse(data);
console.log("Rasa Response: ", data, "\n Status:", textStatus)
},
error: function (errorMessage) {
setBotResponse("");
console.log('Error' + errorMessage);
}
});
}
I guess you could just give it a try!
Regards
Julian
thanks alot will try and let you know
Thanks @JulianGerhard it really helpful for me