Does slot set in action need to be stories

Hi, I have a story that set two slots, one with a value and the other to None.

The one with a value does influence my story, so it’s in my story, but the other one is just set to None because I use it in my action and I don’t need it anymore, it does not affect the story.

My question is, do I still need to put this slot set to none in my story ? It seems to work without it, but what is the good behaviour ?

It would be best to put it in your story. We’ve been struggling with Memoization ourselves, and we’ve found that you need to be aware of every slot you’re setting!

It might hold a small chance that the slot you’re setting to ‘none’ might influence Memoizationpolicy’s next predicted action. This means that your stories could be predicted all wrong. I’m going to make a topic on this myself, since I see many people are struggling with basically the same issue.

Good luck!

1 Like

Thank you for your answer !

Quick question, do you know how you specified in the story that the slot is set to None ? I tried

- slot{"age" : None}

but I got the following error :

ValueError: ('Error in line 7: Invalid to parse arguments in line \' slot{"age": None}\'. Failed to decode parametersas a json object. Make sure the eventname is followed by a proper json object. Error: Expecting value: line 1 column 16 (char 15)', "Invalid story file format. Failed to parse '/app/data/stories/cbt-62-enfant-couvert.md'")

So now I’m using

- slot{"age" : "None"}

But I feel like it could be either set None, or set to the string “None” which isn’t the same and could mess up with my story :thinking:

Sorry to keep you waiting! I was typing another post :slight_smile:

Quick question, do you know how you specified in the story that the slot is set to None ?

exactly like you did:

- slot{"age" : "None"}

And this works.

I agree that it’s not an optimal way to do things, if you want to use a string called “none” as an actual value.

A different solution, if you are able to program it, is set a custom slot that checks if the slot “age” is set using a true/false modifier. I have basically no experience in programming though, so I can’t help you with that!

1 Like

Hey @Remy , just so you know, I tried to create a story using interactive learning and I noticed that when the slot is set to None, it’s infact set to “null” in the story :

- slot{"specialite_medecine_douce": null}
1 Like

interesting. We’ve speculated that it would change values. Since true and false wouldn’t work.