Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This feature will allow you to integrate eddi with a backend server to monitor the messages with a chatbot.

The callback can be invoked by multiple actions that you define in the package , you will receive in the post body a conversationMemorySnapshot which is the model that has all information about the current conversation that invoked this callback, we will go through a step by step example to show you how callbacks work.

In order to enbale and configure callbacks in abot you will have to add this into one of the packages used by the chatbot:

callback package extension
   {
    "type": "eddi://ai.labs.callback",
    "config": {
      "callbackUri": "String",
      "action": "String",
      "callOnActions":"String",
      "timeoutInMillis": Long
      }
    }

Description :

typeMust be eddi://ai.labs.callback to activate a callback.
config.callbackUri

(String) this is the URI that will be invoked; a POST request will be sent to that URI alongside conversationMemorySnapshot in the request body.

config.action(String) if you have one action that will invoke the callback use this property.
config.callOnActions(String) if you have multiple actions that will invoke the callback use this property, it should coma separated values. e.g("action1,action2,...").
config.timeoutInMillis

(Long) a duration of time in millisecond before timeout occurs.

Here is the model for conversationMemorySnapshot :

conversationMemorySnapshot structure
  "conversationMemorySnapshot": {
    "id": "String",
    "botId": "String",
    "botVersion": Integer,
    "environment": "String",
    "conversationState": "String",
    "conversationSteps": [array of conversationSteps],
    "redoCache": []
  }

Description :

id(String) id of the conversation
botId(String) id of the bot
botVersion(String) version of the chatbot
environment(String) bot environment e.g: restricted, unrestricted
conversationState

(String) enumeration values :

READY,
IN_PROGRESS
ENDED
EXECUTION_INTERRUPTED
ERROR

conversationSteps(Array of conversationStep) History of the conversation

Step by Step Example :



  • No labels