How to add string to dispatcher.utter_message

hey

trying to add a message to "utter_greet_name" to send via custom action. I tried:

dispatcher.utter_message(response = "This is a test" + "utter_greet_name")

But it does not work. How can it be done from a custom action? I basically want to add notes to the utterance in domain.yml

You can’t do that. It will look for a response called This is a testutter_greet_name.

You can either send the whole text:

dispatcher.utter_message(response = "This is a test" + ". Hello Megan. How are you?")

or modify your utter_greet_name in the domain and just utter the response:

dispatcher.utter_message(response = "utter_greet_name")

or use variables in responses:

responses:
  utter_greet_name:
  - text: "{prefix}. Hello {name}, how are you?"
dispatcher.utter_message(response = "utter_greet_name", prefix = "This is a test")

thanks @ChrisRahme this is good. I cant find the ‘solution’ button to mark this. Could you maybe look at my other post too? thanks Intent recognition extremely low how to improve?

Happy to help :slight_smile:

It’s because the topic was set to “Feedback on Rasa Open Source”. I changed it, so you should find the button now. Thanks ! :slight_smile:

Sure! My schedule is very tight but I look at all the posts here :slight_smile: I’ll see what I can do in a bit, if I don’t answer it means I can’t help (or someone already answered)