TEXT actions - allow multiple responses
When creating a TEXT action you can only specify a single response. It would be good if you could specify a list of responses, then the bot randomly chooses one. At the moment I can see this type of thing done via API call RandomGreeting, but it would be good not to have to go to the API for that.

See other comments for ways to do this.
2 comments
-
Lars Liden commented
Take a look at "tutorialAPICallbacks.ts" and you'll see a simple example of how to do this:
var greetings = [
"Hello!",
"Greetings!",
"Hi there!"
];cl.AddAPICallback("RandomGreeting", async (memoryManager : ClientMemoryManager) => {
var randomGreeting = greetings[Math.floor(Math.random() * greetings.length)];
return randomGreeting;
}); -
Matt Mazzola commented
We have considered this before but decided not to for time being. We might look at it again in future if there is much interest.
- As you already mentioned in the description it can be done as API callback.
- Not everyone would want a random selection. Some want a bias for certain messages over others or vary in order based on session etc. This means adding a default would still not meet the use case and devs woul still use API callbacks
- It adds complexity to the create text action menu for those who don't want to worry about selecting messages.