I've created a pattern for a specific variable in my dialogue.
Type: Pattern ^[A-Za-z]{1,}$
I'd like the value of that variable to be only one word specifically, no more. I just don't know where to insert it in the JSON editor.
{
"output": {
"text": {
"values": [
"Nice to meet you $firstname. How can I assist you mate?"
],
"selection_policy": "sequential"
}
},
"context": {
"firstname": "<? input.text.substring(0, 1).toUpperCase() + input.text.substring(1) ?>"
}
}