umanganiello / romecitybot

Serverless OpenWhisk backend for Rome public transport Telegram bot
0 stars 1 forks source link

Design the conversation #4

Open umanganiello opened 6 years ago

umanganiello commented 6 years ago

Design the dialog and conversation solution using IBM Watson Assistant.

The execution flow could be:

  1. The user sends a message to the Telegram bot
  2. Telegram calls the OW action via webhook
  3. The backend calls Watson Assistant to check which API should be called according to the user's intent. Then the right action is called to interact with the required API
  4. The action sends the responds to the user via Telegram API

Let's start with the following API: -paline.PalinaLinee

Reference: APIS Docs

umanganiello commented 6 years ago

Some investigation points:

Appendix: is it possible to call APIs from WA?

cybermaster90 commented 6 years ago

This is an example of the JSON From WA:

{

"intents": [{
        "intent": "Saluti",
        "confidence": 1
    }
],
"entities": [],
"input": {
    "text": "ciao"
},
"output": {
    "text": ["Ciao! Posso esserti utile?"],
    "nodes_visited": ["Benvenuto"],
    "log_messages": []
},
"context": {
    "conversation_id": "9f787a0f-36cd-46eb-ba7b-152eb2a9cd9e",
    "system": {
        "dialog_stack": [{
                "dialog_node": "Benvenuto"
            }
        ],
        "dialog_turn_counter": 3,
        "dialog_request_counter": 3,
        "_node_output_map": {
            "Benvenuto": [1, 0, 1],
            "In altri casi": [0]
        }
    }
}

}