Util/MessageModel

Description:
  • The messageModelUtil is a set of utility functions to help deriving string or speech representation of a CMM (Conversation Message Model) message. This is used primarily to output text or speech to voice and text-based channels like Alexa and SMS.
Source:
The messageModelUtil is a set of utility functions to help deriving string or speech representation of a CMM (Conversation Message Model) message. This is used primarily to output text or speech to voice and text-based channels like Alexa and SMS.

Methods

(static) cardToText(card, cardPrefixopt) → {string}

Description:
  • utility function to derive a string representation of a card within a conversation message for use with speech or text based channels like Alexa and SMS.
Source:
Parameters:
Name Type Attributes Description
card object A card (as defined in Conversation Message Model)
cardPrefix string <optional>
A string prefix used before the card content, for example 'Card'
Returns:
A string or speech representation of the card.
Type
string

(static) convertRespToText(convMsg) → {string}

Description:
  • utility function to derive a string representation of a Conversation Message for use with speech or text based channels like Alexa and SMS.
Source:
Parameters:
Name Type Description
convMsg object A message conforming to Conversation Message Model.
Returns:
A string or speech representation of the conversation message.
Type
string