How to SetSlot() from a form validation method in Actions?

Hi all,

I would like to set a slot using SlotSet() from one of the form validation methods. However this needs to be defined as a dictionary. How can I do it? This is what I have and does not work:

def validate_slot1(
        self,
        slot_value: Text,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: DomainDict,
    ) -> Dict[Text, Any]:
        a = tracker.slots.get("CARDINAL")
        if a is None:
            return {SlotSet("test", "value"), "slot1": 'none'}
        else:
            a = some operation
            print('Check sys 3', sys)
            return  {SlotSet("test", "value"), "slot1": 'a')

This returns a TypeError

TypeError: unhashable type: ‘dict’

It should be something like

return(SlotSet(“name of the slot”,value))

examples:

SlotSet(“test”,None)

SlotSet(“test”,a)

In a validate_slot method, you return a dictionary of slot_name: slot_value.

return {"test": "values", "slot1": "a"}