Skip to main content
Random canned text node for selecting a random text from a list of predefined phrases. This node outputs a randomly selected phrase from the configured list, useful for generating varied responses or fallback messages. Input: any - The data type that RandomCannedTextNode accepts as input Output: String - The data type that RandomCannedTextNode outputs Example:
const cannedTextNode = new RandomCannedTextNode({
  id: 'greeting-node',
  cannedPhrases: [
    'Hello! How can I help you?',
    'Hi there! What can I do for you?',
    'Welcome! How may I assist you today?'
  ]
});

Constructor

new RandomCannedTextNode(
    props: RandomCannedTextNodeProps
): RandomCannedTextNode
Creates a new RandomCannedTextNode instance.

Parameters

props (RandomCannedTextNodeProps) Configuration for the random canned text node.

Returns

RandomCannedTextNode Overrides AbstractNode.constructor