Then it needs to understand messages and their meaning (partially at least).
It should also keep track of conversation and remember the conversation history. In other words, it shouldn't lose the thread in the middle of a conversation.
Finally, it should be able to generate messages that answer the users' input.
Let's now go over the main components that Botshot provides.
Botshot supports popular messaging platforms such as Facebook, Telegram or Alexa. The messages are converted to a universal format, so you don't need to worry about compatibility.
For each of these platforms, there is a corresponding chat interface. To enable support for a messaging platform, just enable the associated interface in the config. Read more at Messaging endpoints.
Note
Botshot is fully extensible. If you need to support another messaging API, just implement your own chat interface.
You don't have to be an expert to make a chatbot. Today, there are many available services that do the job for you.
Botshot provides easy integration with the most popular tools, such as Facebook's Wit.ai, Microsoft's Luis.AI, or the offline Rasa NLU.
Or you can use our own Botshot NLU module.
- Analyze what the user wants, aka Intent detection
- Classify the message into a category.
Input:{"text": "Hi there!"}
Output:{"intent": "greeting", "confidence": 0.9854, "source": "botshot_nlu"}
- Find out details about the query, aka Entity extraction
- Extract entities such as dates, places and names from text.
Input:{"text": "Are there any interesting events today?"}
Output:{"query": "events", "date": "2018-01-01"}
Read more at Natural language understanding.
Note
You can also use your own machine learning models. See Entity extractors for more details.
You can picture the conversation as a state machine, with each state representing a specific point in the conversation (like greeting).
The user can move between these states by sending messages, tapping buttons and so on.
Dialog manager also stores conversation context. That is, if you're building a chatbot that does more than say "hello", you will probably also want to remember what the user has said before.
Each state of the conversation has an attached action that returns a response. The most common way of generating responses is using Python code. You can define a function that Botshot will call when a message is received. In this function, you can call your business logic, call any required APIs and generate a response.
Alright, enough chit chat. Let's get coding!