SetSlot is not working


im using rasa 2.0

in my domain.yml i have declare a slot

    type: text
    influence_conversation: false

      - text: | 
                your reservation information
                have requested to book a {room_type_name} room

in i have the following code to set the slot

SlotSet("room_type_name", "Double Bed Room")

but when i display the response im getting the following response:

your reservation information
have requested to book a None room

im setting the slot with the value i need but im still getting it as None,

any ideas why

Thank you

Regards, Noureddine

are you doing return [SlotSet("room_type_name", "Double Bed Room")] or just SlotSet("room_type_name", "Double Bed Room")?

i tired both, im getting the same result

but i have to note that im setting this slot in the validation of another slot, is this a problem ?

i found out something now, related to my issue

in the validation method im getting this error

Warning: Cannot validate `room_type`: make sure the validation method returns the correct output.

my validation method looks like this

    def validate_room_type(
        slot_value: Any,
        dispatcher: CollectingDispatcher,
        tracker: Tracker,
        domain: DomainDict,
    ) -> Dict[Text, Any]:
        """Validate `room_type` value."""

        # If the room_type is not suppled properly, it might be wrong.
        db = DataBase()
        if (db.validate_room_type_selection(slot_value) == 0):
            dispatcher.utter_message(text=f"you have selected an invalid room type")
            return {"room_type": None}
            roomTypeName = db.room_type_name_get_by_id(slot_value)
            tracker.slots["room_type_name"] = roomTypeName
            return [{"room_type": slot_value},{"room_type_name": roomTypeName}]

This is important.

In a validation action, you should do return {"room_type_name": "Double Bed Room"}.

Should be

return {"room_type": slot_value, "room_type_name": roomTypeName}