Rasa form action not requesting next slot

Rasa core - 0.12.2

python: 3.5.2

I am using form action. I have only one slot ‘cuisine’ in required slots

On action server I noticed that instead of calling request_next_slot() function. It is directly calling extract_requested_slot() function.

Below are the logs for the same -

DEBUG:rasa_core_sdk.forms:Validating user input '{'intent': {'confidence': 0.9473636150360107, 'name': 'find_restaurant'}, 'entities': [], 'text': 'lookinf for restaurant', 'intent_ranking': [{'confidence': 0.9473636150360107, 'name': 'find_restaurant'}]}'
DEBUG:rasa_core_sdk.forms:Trying to extract requested slot 'cuisine' ...
DEBUG:rasa_core_sdk.forms:Got mapping '{'not_intent': [], 'intent': [], 'entity': 'cuisine', 'type': 'from_entity'}'
DEBUG:rasa_core_sdk.forms:Failed to extract requested slot 'cuisine'

Stories.md has only one story for it -

      - restaurant_form
      - form{"name":"restaurant_form"}
      - form{"name":null}

Domain.yml contains all required fields -


    auto_fill: false
    type: unfeaturized
    type: unfeaturized


 - find_restaurant:
    use_entities: false


    - text: 'Which cuisine'
   - text: "done!"


 - restaurant_form

policy.yml is as follows-


- name: KerasPolicy
  epochs: 50
  max_history: 6
- name: MemoizationPolicy
  max_history: 6
- name: FallbackPolicy
  nlu_threshold: 0.7
  core_threshold: 0.3
- name: FormPolicy

Form action is not requesting cusine slot to fill slot value. What are the possible reasons for this behaviour?

1 Like

Can you post a picture of the actions.py file? Nothing seems to be missing in the above ones.

Hey @r4sn4 How did you solve this? I am not getting reply back from form action to ask the slot value. Can you please help me with this ? Thanks!

@Rajskc if it is a required slot then you need to overwrite following method in the your form action class

def required_slots(tracker): requiredSlot = [“slot_a”,“slot_b”,“slot_c”] return requiredSlot

you can do that conditionally also, something like if(tracker.get_slot(“slot_d”)==‘abc’): requiredSlot = [“slot_e”]

Hi @apurva Thanks for your reply. I have tried the same but it’s not working. I am trying to use forms for general entities like ‘TIME’ and ‘GPE’ which we get from ner_spacy. I am still not getting back the reply. I will with some trained entities and try to see what is the problem.