Artificial Intelligence Scripting Language

Kirsle's Web Blog

[ Older > ]
Chatbots 3.3

Posted by Kirsle on Saturday, Mar 23 2013 @ 11:06 AM
I just did my presentation about using RiveScript in web applications at the Chatbots 3.3 Conference in Philadelphia.

The video of it was recorded at aimlinstructor on ustream.tv, and a PDF copy of my presentation is available here: Chatbots-3.3.pdf.

Categories: General

[ 0 comments | Add comment | Permalink ]

Chatbot Hosting Service

Posted by Kirsle on Tuesday, Aug 14 2012 @ 6:06 PM
I'm working on a chatbot hosting service for RiveScript bots. This will enable you to get your own chatbot up and running without needing any programming experience. There will be a beta of this service up and running here in the near future.

Some early FAQ's about it:

Q: Will it be free?
A: Absolutely! Chatbots are a pretty difficult thing to monetize anyway, and I think the majority of my users will be running relatively "small" chatbots that won't put too much stress on my server anyway. However, I may introduce fees for hosting very large bots (ones with tens of thousands of custom responses) since these will require more resources to run on my server.

Q: Can I have an Alice clone?
A: Kind of. You will have a choice of a "Base Brain" to use for your bot. Alice will be one of the options for the base brain.

Q: How do Base Brains work?
A: You'll be able to create custom responses for your bot, for example you can say, "when the user says hello, the bot should say Hi there!". Whenever a user says something to your bot that matches one of your custom replies, they will get the reply you created. But, if they say something that doesn't match any of your custom replies, the Base Brain will be the one that provides them with a response instead. So, if you use Alice as your base brain, Alice will be the "fall back" source of responses for your bot.

Q: What are the options for Base Brains?
A: The options are going to be Alice (Dr. Wallace's Alice, who has about 90,000 responses), and Eliza (the classic therapist bot by Joseph Weizenbaum). However, you can elect to not use a base brain at all, in which case your bot's custom responses will be the only source of replies.

Q: How many custom replies can I have?
A: To start out with, there will be a limit of several thousand custom replies. This, I think, is more than enough for the majority of users. Alice has about 90,000 custom replies, and it takes a RiveScript interpreter several seconds to load that many responses from disk. If everybody who runs a RiveScript bot were to upload their own individual copies of Alice, this would put the server under a lot of stress for each message the bots receive. The limit will probably be about 10,000 custom responses.

Q: How is the Alice base brain going to work then?
A: The Alice base brain will run as a background service on the server. This way she only needs to be loaded from disk once and will be able to serve as the backup reply source for many bots simultaneously.

Q: Will there be a way to host bots as large as Alice?
A: We'll cross that bridge when we get to it. One idea I have will be to run large custom bots as background services like the Alice base brain.

Q: Will my bots be able to sign on to AIM, MSN, or Yahoo?
A: The bot hosting service, at least to begin with, will only host web-based bots (ones where you chat with them via a web browser). However, there will be an API (Application Programming Interface) for third party developers to be able to hook their apps into the hosting service. So, somebody could write an AIM bot for example that uses the RiveScript hosting service to get responses for users over instant messenger.

Q: What will the limitations be?
A: There will be a limitation on the number of custom responses you can have (somewhere around 10,000) due to server load issues. You also won't be allowed to use your own custom Perl or JavaScript object macros in your RiveScript code (because it would be dangerous to run custom code on the web server). However, there will be a handful of pre-defined objects available to use in your code.

I think that should cover it for now. Stay tuned!

RiveScript? In my web browser?

Posted by Kirsle on Tuesday, Aug 07 2012 @ 6:35 PM
Introducing... RiveScript.js!

This is a RiveScript interpreter written in JavaScript! It can run in your web browser (using ajax to load documents) and it can run in node.js!

There is a demo available right here. That will let you chat with the standard RiveScript brain that tends to ship with all the libraries.

If you're feeling more adventurous, I also have a demo where you can chat with Dr. Wallace's A.L.I.C.E.! Be warned though, Alice is a large A.I. and you'll be running her entirely in your web browser. On my system though she runs just fine, and can respond instantly -- even faster than the Perl and Python RiveScript libraries!

If you'd like to use RiveScript.js, you can check it out on GitHub. There are direct links to the JS files on the RiveScript Interpreters page.

What's so great about RiveScript.js? With this, you can easily add a chatbot to your website, and it doesn't even require any fancy server-side setting up! Unlike the Perl, Python and Java versions of RiveScript, this one will run in your end user's web browser. All your server needs to do is host your RiveScript source files!

The JavaScript library comes with support for using JavaScript to write objects for your RiveScript code. So far, this library has the best JavaScript support out of all of them. ;)

Disclaimer: this library is very recent. While it seems to work and it passes the whole test suite, there may be--and probably are--some bugs. If you find any, let me know so I can fix them!

RiveScript Tutorial

Posted by Kirsle on Friday, Jun 08 2012 @ 1:24 PM
I've written a RiveScript tutorial! You can see it here. It covers just about everything you can do with RiveScript, but it doesn't go in-depth with topic inheritence and inclusion (as these are advanced subjects). The initial version is released, so if you've been wanting to learn RiveScript, give it a read-through and let me know if any parts of it are confusing or need to be expanded on some more.

RiveScript-Python Released

Posted by Kirsle on Friday, Apr 20 2012 @ 3:25 PM
I've released the Python version of RiveScript!

Get it at GitHub!

It should be as feature-complete as the Perl version, though obviously it hasn't been tested for quite as many years yet. ;) It will let you write RiveScript objects using Python code, and there's an included example for how you would set up a JavaScript handler too.

The module, rivescript.py can also be executed as a stand-alone Python script. In this case, it will behave exactly like the rivescript command that ships with the Perl version: you'll be able to interactively test out your RiveScript bot. It also supports JSON Mode, so a C++ program for example could still use rivescript.py to be able to get responses from your bot.

The bugs I found in the Perl version while writing this have also been fixed. The Perl version has also moved to github: rivescript-perl. Furthermore, the Java version of RiveScript is on github now too: rivescript-java.

Categories: Python , Perl , Java

[ 0 comments | Add comment | Permalink ]

[ Older > ]