Adding interactions

Sending an interaction

interactionTarget -> Service
   {
       "type" : "interaction",
       "id_interaction" : "café",
       "enabled" : true,
       
       "descriptor" : {
           "fr-fr" : ["café"],
           "en-us" : ["coffee"] 
       },
       
       "verbose" : {
           "fr-fr" : "Faire un café",
           "en-us" : "Make a coffee"
       },
       
       "parameters" : [
            {
                 "archetype" : "int",
                 "id_parameter" : "sucre",
                 
                 "descriptor" : {
                     "fr-fr" : ["sucre"],
                     "en-us" : ["sugar"] 
                  },
                   
                   "verbose" : {
                     "fr-fr" : "nombre de sucres",
                     "en-us" : "sugar amount"
                  },
                  "optional": true, // If not specified, worth "false"
                  "multiple": false // If not specified, worth "false"
            }
       ]
   }

Field Description
id_interaction Unique identifier to be given to the interaction
enabled Indicates if the interaction is available for the user.
It can be reactivated or deactivated later (see enable/interaction and disable/interaction).
descriptor Keywords of the interaction (see target/introduction).
verbose Verbal sentence describing the interaction (see target/introduction).
parameters All the parameters of the interaction.

Warning:
Adding an interaction with an ID which has already been used by the target will replace the past one.

The same method should be used to modify an interaction ; there is still no method of partial modification.


Confirmation

confirm_interactionService -> Target
   {
       "type" : "confirm_interaction",
       "id_session" : "session_1674",
       "id_interaction" : "coffee",
   }

Sending a set of interactions

interaction_arrayTarget -> Service
{
   "type" : "interaction_array",
   "interactions" : [
      {
         id_interaction" : "coffee",
         // ...
      },
      {
         id_interaction" : "tea",
         // ...
      },
      {
         id_interaction" : "capuccino",
         // ...
      }
   ]
}

Field Description
interactions Interaction table to add

Confirmation

confirm_interaction_arrayService -> Target
   {
      "type" : "confirm_interaction_array",
      "id_session" : "session_1674",
      "id_interaction" : [
         "coffee",
         "tea",
         "capuccino"
      ]
   }

API connection address :

TCP : golem.ai:3003
Web Socket : golem.ai:3004/ws
Web Socket Sécurisé (WSS) : golem.ai:3005/ws
HTTP : golem.ai:3004/http
HTTPS : golem.ai:3005/http