List Slot - Append instead of override

I had a similar problem where inside a form if a had the same intent that triggered the form without any entity it override my slot with an empty list. I fixed this with a custom mapping and two slots:

async def extract_slotform(self, dispatcher, tracker, domain):
    val = tracker.get_slot("slotform")
    nval = tracker.get_slot("slotentity")
    if val is None:
        val = []
    for n in nval:
        if n not in val:
            val.append(n)
    if not val:
        return {'slotform': None}
    return {'slotform': val}
1 Like