Appery Smart Reply

Smart Reply

SmartReply.suggestReplies

Parameters
  • {array of message objects} conversation - log of recent messages in a conversation

    Message object sample:
    {
        "timestamp": Date.now(), <long>
        "message": "How are you ?", <string>
        "isLocalUser": false <boolean>
    }

Firebase Smart Reply Doc

  • {function} success - callback function which takes a parameter data which will be invoked on success
  • {function} error - callback function which takes a parameter err which will be invoked on failure

Example:

window.ApperyioMLCordovaPlugin.SmartReply.suggestReplies(conversation, successCallback, errorCallback)

Sample JSON callback: smart_reply.json