Upper-casing domain variables

So I want to have templates in my domain that contain variables but despite the capitalised text stored in the slot, the output utterance always contains a lowercase version of the variable.

I understand I can create a custom action that passes a specific variable to utter_message, but it there a way that I can force the domain variable to keep the case it has in its slot?

1 Like

I have the same problem. When I fill a slot it appears in lowercase. As a workaround I made a custom action with smt like this:

name = (tracker.latest_message['entities'][0]['value']).title()
dispatcher.utter_message(self.text["greet"].format(name.split(" ")[0]))
return [SlotSet("name",name)]

But I dont really like it, bc it made me create a new action instead of using a simple utter response like this one:

utter_greet: 
      - text: "Nice to meet you {name} :)"

If anyone knows how to accomplish this using an utter response please tell me :smiley: