Rasa not Ending the flow - Rasa Pro CALM - Rasa CALM - Rasa Community Forum
Rasa not Ending the flow - Rasa Pro CALM
post by sk1382 on Jul 16, 2024
flow.yml:
choose:
description: asks user to choose from the given options
steps:
- collect: user_choice
ask_before_filling: true
next:
- if: slots.user_choice = "option_1"
then:
- action: utter_option_1
- link: confirmation
- else:
- action: utter_option_2
- link: confirmation
confirmation:
description: to confirm with user for booking appointment
steps:
- collect: final_confirmation
ask_before_filling: true
next:
- if: not slots.final_confirmation
then:
- action: utter_appointment_cancelled
- link: anything_else
- else:
- collect: user_place
- collect: user_pincode
rejections:
- if: not (slots.user_pincode matches "^\d{6}$")
utter: utter_invalid
next: appointment_successful
- action: utter_appointment_booked
id: appointment_successful
- link: anything_else
anything_else:
description: This flow asks for anything else to help with.
if: False
steps:
- action: utter_anything_else
next: END
domain.yml:
utter_anything_else:
- text: "is there anythign else to do?"
- In anyway I try to make this flow stop at the end, it is not stopping rather repeating the utterances of the one before the previous flow again and again.
The issue is as shown in the picture below:
If anything else is required, let me know to share. Can anybody explain why the flow is not stopping?
Any correcting replies are appreciated.
post by l2nguyen on Jul 17, 2024
From looking at your chat, the Let’s Continue with message means that you’re stuck in this digression loop because the LLM thinks you want to start another flow. I would suggest you cleaning up your flows - you may be using link when you don’t need to.
Additionally, you don’t need an anything_else flow or the link to it. There’s the default pattern_completed for that. You should modify that if you want to customize what the bot does at the end of a flow.
post by sk1382 on Jul 18, 2024
Thank you for the reply. I tried what you said, but it is still persisting in another way.
flows.yml:
confirmation:
description: to confirm with user for booking appointment
steps:
- collect: final_confirmation
ask_before_filling: true
next:
- if: not slots.final_confirmation
then:
- action: utter_appointment_cancelled
next: END
- else:
- collect: user_place
- collect: user_pincode
rejections:
- if: not (slots.user_pincode matches "^\d{6}$")
utter: utter_invalid
next: appointment_successful
- action: utter_appointment_booked
id: appointment_successful
I have even made other flow’s collect’s slot to ask_before_filling: true and reset_after_flow_ends: true just in case the bot considers the previous slots and respond where i don’t it need to do.
Now i face in a way as shown in the below image:
Could you give me a corrected way for this?