I have a custom action which assigns random numbers to 2 variables. but it gets executed by the bot even when not intended. What could be the issue and how can i fix it…?
after seeing the messages in the terminal using the --debug command when running the actions server, i noticed that the request to run that action was received at least 3 times and it was executed successfully. But, i have mentioned the action only once in my story.
I am unable to figure out what is causing this. Please help me out here
You have the right idea review the debug log and you can post it here if you like. I would also want to look at rules/stories that reference the action.
version: "3.1"
rules:
- rule: respond to greet
steps:
- intent: greet
- action: utter_greet
- rule: respond to goodbye
steps:
- intent: goodbye
- action: utter_goodbye
- rule: respond to thanks
steps:
- intent: thanks
- action: utter_thanks
- rule: provide help
steps:
- intent: help
- action: utter_help
Here is the action debug logs
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'action_get_info'.
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'action_perform_addition_A'.
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'action_perform_subtraction_A'.
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'action_perform_addition_B'.
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'action_perform_subtraction_B'.
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'action_addition_quiz_A'.
2024-01-15 22:08:37 INFO rasa_sdk.executor - Registered function for 'check_ans_addition_quiz_A'.
2024-01-15 22:08:37 INFO rasa_sdk.endpoint - Starting plugins...
2024-01-15 22:08:37 DEBUG rasa_sdk.plugin - No plugins found: No module named 'rasa_sdk_plugins'
2024-01-15 22:08:37 INFO rasa_sdk.endpoint - Action endpoint is up and running on http://0.0.0.0:5055
2024-01-15 22:08:37 DEBUG rasa_sdk.utils - Using the default number of Sanic workers (1).
2024-01-15 22:11:25 DEBUG rasa_sdk.executor - Received request to run 'action_addition_quiz_A'
2024-01-15 22:11:25 DEBUG rasa_sdk.executor - Finished running 'action_addition_quiz_A'
2024-01-15 22:11:28 DEBUG rasa_sdk.executor - Received request to run 'action_addition_quiz_A'
2024-01-15 22:11:28 DEBUG rasa_sdk.executor - Finished running 'action_addition_quiz_A'
2024-01-15 22:11:40 DEBUG rasa_sdk.executor - Received request to run 'action_addition_quiz_A'
2024-01-15 22:11:40 DEBUG rasa_sdk.executor - Finished running 'action_addition_quiz_A'
2024-01-15 22:11:42 DEBUG rasa_sdk.executor - Received request to run 'check_ans_addition_quiz_A'
2024-01-15 22:11:42 DEBUG rasa_sdk.executor - Finished running 'check_ans_addition_quiz_A'
As you can see, the action action_addition_quiz_A is running more than once.
Your problem is probably related to those long stories. I would delete all of the stories and replace them with rules and forms. Use forms for those longer stories.
I used forms for 1 story and it is working fine, thank you for that. after the execution of the form, the bot is going for action_nlu_fallback. Is it because it is getting confused by the stories or something else? Will be be solved if i replace all my stories with forms and rules?
Check if you accidentally duplicated the trigger or if there’s some unexpected fallback triggering it. Also, dive into your stories file again, sometimes the order matters more than we think.
Now i have encountered a new problem after using forms. The intent is being recognized correctly, but the correct entity is not being recognised. what do i do?