In ServiceNow New York release, making a dependent choice in a Virtual Agent, requires this workaround.
Code for Script Include:
Name: VAChoiceListGenerator
Accessible from: All Application scopes
function VAChoiceListGenerator(table, field, dependend) {
var choices = new GlideChoiceListGenerator(table, field, dependend);
return choices.get();
}
Get the full example from here (download and Import XML) https://pastebin.com/HD1bkkDL