How to programmatically read a custom type's keys?

language-model

#1

Is there a way to programmatically read the model from the intent handler?
Say I have a custom type called “Title” with possible values “Mr”, “Mrs”, “Miss” and “Doctor”.
I want to read the possible keys from the custom type as specified in the model so I can dynamically generate the suggestion chips based on that, rather than have to specify the same values twice —i.e. once in the model and once in the code to generate the chips. This would also lower maintenance cost because I would not have to change the code if the possible values change in the model.


#2

There’s no “official” way but I see the benefit.

For now, you have to access the model files on your own.