Answer

When a request has been proceeded without any error, the front receives an answer, giving the user a feedback/return on his request. The resquest could have succeded, been incomplete, or failed.

Either way

Whatever the outcome is, the answer will contain the following informations :

answerService -> Front
   {
       "type" : "answer",
       "id_session" : "machine_145",
       "id_request" : 12,
       
       "language" : "en-en",
       "text" : "Done!",
       
       "status" : "ok"
   }

The "text" field countains a natural language answer, which can be given to the user.
The "status" can value :

  • "ok" -> The request has been succesfully executed.
  • "ko" -> The request has not been executed : the service did not understand.
  • "incomplete" -> The request is missing informations.

Incomplete request

A request can be incomplete.

For example :
"I want to take the train next week"
-> The destination is missing

answerService -> Front
   {
       "type" : "answer",
       "id_session" : "machine_145",
       "id_request" : 12,
       
       "language" : "en-en",
       "text" : "To take the train, I have to know your city of destination",
       
       "status" : "incomplete",
       
       "id_interaction" : "ticket_train",
       "id_missing_parameters" : [
            "city_destination"
        ]
   }

In this case, we will note that :

  • The text specifies the user about the missing information.
  • We receive "id_interaction" specifying which intercation has been chosen (see target/interaction).
  • We receive "id_missing_parameters" specifying the parameters which have not been fulfilled by the service (see target/parameters).

Note:
The text is generated from the verboses of the interactions and the verboses of the paremeters.
It invites the user to rephrase his request.
If the quality of this message is not satisfying, we can modify the corresponding verboses.



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