How to format response starting with entity value?

Hi I am trying to do 2 things and haven’t found the documentation or examples I need to get this right … first on return from a custom action I have the response array [“A”,“B”,“C”] correctly being returned, so I want to put together a response that says something like “A, B and C are the returned values”

How do I do this?

Presumably I need to extract specific ordinals from the array and then construct the response… but how? Thanks!

Hi @tubazilla

Are you looking for something like this?

    a = 'A-value' 
    b = 'B-value'
    c = 'C-value'
    message =  f"{a}, {b} and {c} are the returned values"
    dispatcher.utter_message(text=message)

Thanks @Johan1us - that’s actually how I’d done it anyway :wink:

I was wondering if there was a more cunning way to do it yaml but I think you confirmed my suspicion.

All good and thanks again

Hi @tubazilla,

Yes, you are right. It can also be done through your domain.yml. If you have filled a slot, then you can call it by including {slot_name} in your response.

See here: