Consecutive utterances

Hello I want my chatbot to send two consecutive messages and therefore I created following:

In domain

responses:

utter_greet:

- text: “Hello! Nice to see you”

utter_sleep_well_question:

- text: “Did you sleep well?”

utter_happy:

- text: “Great, carry on!”

In stories

- story: test path

steps:

- intent: greet

- action: utter_greet

- action: utter_sleep_well_question

- intent: sleep_great

- action: utter_happy

But when talking to the chatbot, it only gives back the message from utter_greet and then unfortunately doesn’t continue with utter_sleep_well_question. Why is that?

I have seen online that multiple people have had the same issue (but often not resolved or a long time ago). Can someone help?

@shamalle Hello, and welcome to the forum :bouquet:

Can you confirm, you are using rasa open source and running the bot using rasa shell --debug or you are using rasa x ?

Please share the rasa --version

@shamalle can you format the above code using “”" “”"

Wow, that was a fast reply! Thank you!

When giving the command rasa --version in the rasa docker container I get the following:

Rasa Version : 2.8.3 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.1 Rasa X Version : None Python Version : 3.8.10 Operating System : Linux-5.10.47-linuxkit-x86_64-with-glibc2.29 Python Path : /opt/venv/bin/python

I am using rasa open source. I have a flutter application and I just check the chatbot with my emulator where I just open the chatbot in the app. I am not an expert in development, it is my first project, so I hope I gave enough information!

@shamalle means you are rending your rasa chatbot response (utterances ) in the flutter application, which your front end, is that right? yes or no or what is your frontend?

PS: please mention me @ and nik202 in every reply.

@nik202

The flutter application is in the frontend and the files for the rasa chatbot are in the backend. I have these .yml files for the nlu, stories, domain, …

Currently I change there for example a response in the domain.yml file in the backend. Then I retrain with “rasa train” in the container and then “docker-compose down” and “docker-compose up”. When I do this and restart the app I see that the changes are done and the chatbot uses the changed sentence. (I got the project from a student who was working on it, so it may be not the most elegant way?)

here I made screenshots of the domain.yml and the stories.yml @nik202

@shamalle can you do the experiment if you want to get the clear idea about the issue, run your project on local machine (not using docker) and run the command rasa shell --debug and check are you able to get the consecutive responses.

@shamalle basically, I am not an expert on flutter, but I guess this is the issue of flutter frontend only.

Please do as suggested and let me know this. Will you do it yes or no ?


Note: If you want to install the rasa open source on local machine please follow these steps:

Please install Anaconda from Anaconda | Individual Edition , then create the conda environment using the following command

  1. conda create -n rasa3 python=3.8
  2. conda activate rasa 3

Note: I’d recommend to create a fresh environment if not you can proceed with next steps:

For Rasa Open Source:

`pip install rasa==2.8.1`
`pip install rasa-sdk==2.8.1'

check version rasa --version its install or not

For Installing basic project:

rasa init

OR

Just go to your project folder and train the bot and run rasa shell --debug

Good Luck and do let me know your progress!

1 Like

@nik202 Sorry for the late reply.

You were right, it is an issue with the frontend! The backend incl. rasa is working perfectly (both responses are made), it is the flutter program that just fetches the first message of the bot.

I am so sorry that I wasn’t able to find this out, I wasn’t thinking about this could have been an issue. I still got a long way to learn a lot about projects and how development works. Thank you for your (extremely fast) help! :smiley: I am so relieved

I hope that this thread now can maybe help others that also had this issue and were absolutely clueless like me:)

@shamalle No worries :slight_smile:

@shamalle For your story ‘test path’ to give consecutive utterences, you will have to mention it in the rules.yml file.

  • rule: consecutive utterences
    steps:
    • intent: greet
    • action: utter_greet
    • action: utter_any_questions

This method worked for me, when I came across this situation :slight_smile:-