How the framework of Abot works
The brain of the Abot tool consists of three parts: An API (application program interface) that accepts natural language (human language) input. A state machine for tracking grammar and context across inputs to enable chaining of commands. A router to select the correct plugin that sends inputs based on the present commands and past context. Abot combines these three parts and libraries to hasten the process of coding one’s personal digital assistant.
Abot processes, routes and responds to every message that it receives. Actually deciding what to say is the role of plugins. Let’s take a look at an example: 1. A user sends the following message via the console, SMS,
email, etc: ‘Show me Chinese restaurants nearby.’ 2. Abot pre-processes the message, breaking it into key components: a. Commands: [Show] b. Objects: [me, Chinese restaurants nearby] 3. Abot routes this message to the respective plugin: a. Route: [find_chinese] b. Plugin: [restaurant] 4. The plugin then generates a response: ‘Sure, how does
Sun Shi sound? It's nearby.’ 5. Abot sends the response to the user.
If you don’t pass anything to the script, Postgres will, by default, set the host = 127.0.0.1, port = 5432 and username = postgres. 4. Once the script is completed, run the following command: And then visit Abot at localhost:4200. Once you have everything installed and running, you can start communicating with Abot. To do so locally, use the command $ abot at the console. But before that, you’ll need to sign up. To do so, go to http://localhost:4200 and click on ‘Sign up’ in the header. Fill in the appropriate information, and remember the phone number you use (which should be in the format of +918889992221 — no spaces, and with a leading +91).
Once you’ve created an account, type the following code:
Replace the number with the one you used to sign up. Abot won’t do much at this point; we will need to add plugins to add more functionalities.