requested_slot remains 'none' after restarting form
See original GitHub issueRasa version:
rasa-core 0.13.8
rasa-core-sdk 0.13.1
rasa-nlu 0.14.6
Python version:
3.6
Operating system (windows, osx, …):
Ubuntu 16.04
Issue:
I am using checkpoints to loop over substories. Users fill a form with information about a single item, but they may want multiple items, so i want to ask users at the end of each item submission if they want to add another. Regardless, at the end of each item the information from those slots is concatenated and shoved somewhere for later use, and then all the slots of that form are manually set to None.
However, if i then try to fire up the form again it says the requested_slot is none and it fails. I can get around this by setting requested_slot to the first slot in my required slot mappings, but i was wondering if this is meant to be done automatically and i am not doing it properly?
Content of configuration file (config.yml):
language: "en"
pipeline:
- name: "nlp_spacy"
- name: "tokenizer_spacy"
- name: "intent_entity_featurizer_regex"
- name: "intent_featurizer_spacy"
- name: "ner_crf"
- name: "intent_featurizer_count_vectors"
- name: "intent_classifier_tensorflow_embedding"
epochs: 600
- name: "ner_duckling_http"
url: "http://0.0.0.0:8000"
dimensions: ["time", "number", "distance"]
Content of domain file (stories.md)
## greet1
* greet
- utter_greet
## new_quote1
* greet
- utter_greet
* quote
- action_fillall
- items_form
- form{"name": "items_form"}
- form{"name": null}
- action_collect_items
- utter_ask_add_item
> check_add_item
## add_item
> check_add_item
* affirm
- items_form
- form{"name": "items_form"}
- form{"name": null}
- action_collect_items
> check_add_item
## not_add_item
> check_add_item
* deny
- utter_return_quote
## general_thanks
* thanks
- utter_welcome
* goodbye
- utter_goodbye
- action_restart
## thanks_goodbye
* thanks_and_goodbye
- utter_welcome
- utter_goodbye
- action_restart
action_collect_items action (please don’t judge me on my sloppy python!) Here the ‘test_slot’ is just a temporary dumping ground where i shove the concatenated info from all previous items.
class CollectItems(Action):
def name(self):
return "action_collect_items"
def run(self, dispatcher, tracker, domain):
current_slots = tracker.slots
if current_slots['test_slot'] == None:
test = ''
else:
test = current_slots['test_slot']
item_slot_keys = ['dimensions', 'length', 'width', 'height', 'quantity', 'weight']
item_slot_values = [ current_slots[slot] for slot in item_slot_keys ]
test = test.join([str(i) for i in item_slot_values])
test = test + ": "
result = [SlotSet('test_slot', test), SlotSet('requested_slot', 'dimensions')]
for slot in item_slot_keys:
result.append(SlotSet(slot, None))
return result
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thanks for raising this issue, @Ghostvv will get back to you about it soon.
Ah okay I see, thanks!