Where is this call of action_default_ask_affirmation coming from?

Hi,

I faced an inexplicable situation while trying to mimic the rasa-demo’s TwoStageFallbackPolicy, which articulates around “action_default_fallback” and “action_default_ask_affirmation” classes as far as I understand:

Capture

Even after renaming both classes (with no other modification in the code), the chatbot called the “action_default_ask_affirmation” class at some point and dispatched a selection box in English (my chatbot is French), neither I, nor the rasa-demo itself referred to in the first place.

My questions:

  • Where is this call coming from?
  • What about its content? Where is it stored?
  • Is it related to the fact the “action_default_ask_affirmation” is part of the default actions stack?
  • Could I access it?

Thank you for your help.

z.

Details:

  • Windows Subsystem for Linux Ubuntu 18.04
  • rasa version = 1.3.7
  • rasa-sdk version = 1.3.3
  • rasa-x version = 0.21.1
  • Installed in a conda env
  • Direct install

what do you mean rename both class ? Have you overwrite them? if you use custom action_default_ask_affirmation class ,you must denote it in you domain file as an action.

1.If you set the TwoStageFallBackPolicy, the action_default_ask_affirmation will be called if your intent confidence is below the nlu threshold

2.in rasa/core/policies,you can find the implementation of TwoStageFallBackPolicy and rasa/core/actions/action.py ,you can find the implementation of action_default_ask_affirmation

Hope my answer can help you . :rofl:

Hi @rookiebird, thanks for answering me,

By renaming the class I meant change the .name attribute of the class, which I ended up updating in every file mentioning it eventually (i.e. actions.py and domain.yml). My code compiles, there is no naming problem. Also, your points 1. and 2. are checked.

It’s just that since I renamed the “action_default_ask_affirmation” class, when called, I expected to see its new name shown in the core action description but no, “action_default_ask_affirmation” still appears (see screenshot):

Thus my actual question, is it possible to change default actions’ names in the first place ? As my changes don’t seem to be taken into account (I initially wanted to change class names to French for local readability purposes).

If you custom the action_default_ask_affirmation and rename it just as ‘action_default_ask_affirmation_rewrite’,then you can modify the following

1.action denoted in domain.yml to be action_default_ask_affirmation_rewrite

2.ACTION_DEFAULT_ASK_AFFIRMATION_NAME = “action_default_ask_affirmation_rewrite” in rasa/core/actions/action.py