In my dialogs, I’m trying to tie back to previous parts of the conversation to make things feel more natural. In some cases, I can just refer to a slot in the template, but in other cases, I need to transform that slot value into something more human.
In concept, I want to do something like:
utter_blah:
- text: That's the color of a forest.
slot: {"color":"green"}
- text: That is the color of a fire engine
slot: {"color":"red"}
Since I don’t think anything like that is possible, I’m setting specific slots (e.g., “slot_utter_blah”) when I’m, say, setting the “color” slot and then I just have:
utter_blah:
- text: {slot_utter_blah}
But it’s kind of a drag to have to manage all that.
I guess the other approach is to have utter_blah_green and utter_blah_red and then create a bunch of stories with a featurized slot (“color”). But that seems like overkill for this common task.
Is there an idiomatic way to do this?