This is a conversational AI, available for the Byteball network. At the moment it's serving Rosie through Pandorabots' API, but without modifying the code you can serve any other AIML-compliant chatbot. |
---|
It saves sessions! It will remember you on each device. You can easily test this; for example pair with it from multiple devices and introduce yourself through a different name on each one. Then ask him what's your name, even at weeks apart, and it will remember you on each device separately.
In the Byteball wallet, go to PAIRED DEVICES -> Add a new device -> Accept invitation from the other device. Then scan the following QR code, or input the address manually.
ApOpqXbI7GpqOl3Z96QW/GSNgv04g4RcFr/[email protected]/bb#0000
For development I used Windows 10, WebStorm 2017 and Node 8. The WebStorm configuration is included in the .idea folder. There's a Babel watcher because I wanted to use all ECMAScript 6 features (for example importing from a JSON file).
Code beauty is assured using Airbnb's ESLint configuration.
- In conf.js make sure you have this hub selected:
exports.hub = 'byteball.org/bb-test';
- Run this command:
sed -ie "s/version = '1.0'/version = '1.0t'/; s/alt = '1'/alt = '2'/" node_modules/byteballcore/constants.js
- Create an account with https://developer.pandorabots.com. We will use their API to upload on their server Rosie, which is a chatbot base, then compile it and make it available for each user on a different session.
- Install Pandorabots CLI (we'll use this to interact with their API from the command line). Then use it to create a chatbot.json file that will be used for API authentication by both this client and our project.
$ npm install -g pb-cli
...
$ pb init
app_id? (required) *********
user_key? (required) ********
botname? (recommended) rosie
hostname? (optional)
Make sure that the newly created chatbot.json is also available in the same directory as start.js. 5. Download Rosie's source files, then create a new bot on the server and upload Rosie, then (optionally) remove the downloaded files since they won't be needed and compile the bot:
$ git clone https://github.com/pandorabots/rosie
...
$ pb create rosie
ok
$ pb push rosie/lib/aiml/
...
$ pb push rosie/lib/maps/
...
$ pb push rosie/lib/sets/
...
$ pb push rosie/lib/substitutions/
...
$ pb push rosie/lib/system/
...
$ rm -fr rosie/
$ pb compile
ok
- Test Rosie:
$ pb talk "Hi. What is your name?"
Hi nice to see you!
I am called Rosie.
- Put start.js through Babel, then run the compiled version!
$ ./node_modules/.bin/babel.cmd start.js --out-file start-compiled.js --source-maps --presets env
$ node start-compiled.js
On Linux, you would replace in the above command "babel.cmd" with "babel".
7N6RHAKVPHXZR6OXQNGHQKWMM7RSGWAQ (Byteball address) |
---|
Funds go towards:
-
hosting
-
Pandorabots' API subscription
-
my time for developing more open source and well documented bots for the Byteball network
You may contact me through Byteball's Slack:
My username is @la