Answered

Accessing the chatbot's long term memory

Your documentation mentions short and long-term memory in this article - https://docs.nativechat.com/docs/1.0/cognitive-flow/bot-memory.html


How can I access the long-term memory in the cognitive flow?



Answer

Hello Max,


You cannot access the long-term memory of the bot directly. The bot uses the long-term memory to display suggestions or to automatically pre-fill some of the data in a conversation. For example, if you take a look at the question step that gathers first and last name in the Book a Doctor sample, you will see a good example of using suggestions. For one specific user, after they provide their name once, in subsequent conversations, the bot would suggest the name that is saved in the long-term memory.


...
{
          "is-explicit": true,
          "entity-type": "Text",
          "messages": [
            "What are your first and last names?"
          ],
          "reactions": {
            "suggestions": [
              "Are you {{contactName}}?",
              "Is your name {{contactName}}?"
            ],
            "validations": [
              {
                "type": "regex",
                "error-message": [
                  "Please enter your first and last name."
                ],
                "parameters": {
                  "value": "(\\w.+\\s).+"
                }
              }
            ]
          },
          "type": "question",
          "entity": "contactName"
        }
...


I hope this helps.


Login or Signup to post a comment