Thumbnail

Aimlbot

by Synthiam

AimlBot is a localized chatbot client that uses AIML (Artificial Intelligence Markup Language).

Requires ARC v22 (Updated 5/12/2022) Source Code

How to add the Aimlbot robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Artificial Intelligence category tab.
  5. Press the Aimlbot icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Aimlbot robot skill.


How to use the Aimlbot robot skill

AimlBot is a localized chatbot client that uses AIML (Artificial Intelligence Markup Language). The AIML configuration files are stored locally and can be edited by hand or with an AIML editing tool. Additionally, settings for the session can be adjusted programmatically using the ControlCommand.

Main Window

User-inserted image

1. Text Entry Field This is where you write your text entry. 2. Send button Click the Send button, or hit enter when you are ready to send your text entry to the AimlBot. 3. Response Display This is where the AimlBot will respond with its text-based response.

Settings

User-inserted image

1. Response Variable and Script AIML responses can embed ez-script with square brackets [ and ]. For example, if you load the AIML file t.aiml, you will find this example under the category "test." Search the document for the word "test" and see the following response...

This is just a test $Direction.[say("Testing")]

As you can see in the above example, when the word "test" is entered as a phrase into the artificial intelligence engine, the response includes a variable and a script to run.

2. Open Config Folder You can specify the configuration folder to have multiple personalities per project. The new config folder must contain the CONFIG and AIML folders from the plugin root folder. Look in the current config folder of this plugin, and copy the AIML and CONFIG folders into the new folder. Specify the new folder by pressing the change configuration folder button. This value is saved per project.

*Note: make a copy of the AIML files if you will be making modifications to them. The files may be overwritten during robot skill updates. Here's a video explaining how to make a copy of the default files into a new folder so you can edit them.

3. Open AIML Editor Please note that the AIML editor requires .Net 3.5 to be installed. The config menu of this plugin has a button to open the AIML config folder or search for a phrase among all AIML files. The file search-ability makes it easy to find a response to edit with your editor, such as with a notepad. There's also a built-in editor that I've included; more info is below.

GaitoBotEditor Springwald Software created a built-in editor called GaitoBotEditorGaitoBotEditor was developed by Springwald Software with no relation to Synthiam. Synthiam cannot support or assist with using this AIML editor, but their online manual is straightforward. The AIML files will have to be loaded into the editor as a new workspace. We don't have much experience with the editor, but it seems to do the trick! The GaitoBotEditor requires .Net 3.5 to be installed.

4. Search You may open the AIML editor directly with the Open AIML Editor button in the settings menu. Otherwise, if you're looking for files related to specific keywords, the SEARCH option will be helpful. If you want to modify all responses to the word " Banana," type the word "Banana" and press SEARCH. The interface will prompt a menu asking if you wish to open all the files corresponding to that word.

Session Settings Memory

Each session starts with a fresh memory. The default value can be specified by editing the config settings files on startup. However, during the chat session the values can be altered. They can be altered by either entering phrase to alter them, or programatically with the SetValue ControlCommand().

Here is an example of altering the value by speaking to the chatbot. The name of the user has been changed to Mr. Bob by telling the chatbot the value.

User-inserted image

Alternatively, the same value can be changed by a script. For example, if the Camera Device is combined with the Cognitive Face robot skill, the chatbot can be told who you are. The example syntax would be


ControlCommand("AimlBot", "SetValue", "name", "Mr Bob")

All setting data from the current session can be viewed by selecting the Show All Settings option in the dropdown.

User-inserted image

Control Commands

A few ControlCommand for interacting with this skill programmatically from other robot skills.

- SetPhrase This will set the phrase as if typed into the user input box. If using a speech recognition robot skill, this is the ControlCommand to send the user's spoken phrase text.

- SetValue This will set the value in the session to your specified value. For example, you can set the value NAME to "Bob," and the chatbot will now know you as Bob. Interacting with settings can be done by asking the chatbot a setting value, such as 'What is my name?' or 'What is my birthday?'. You can configure these settings with text by entering 'My name is Bob' or 'My birthday is Friday', and the chatbot will know those values.

*Note: All settings can be viewed by selecting the View All Settings option in the menu dropdown on the main screen.

How to Use AimlBot Skill

  1. Add the AimlBot Skill to your ARC project (Project -> Add Skill -> Artificial Intelligence -> AimlBot).

  2. Enter your text into the text field in the main window.

  3. Click the Send button.

  4. Read the response in the response display.

Script Samples

The AilmBot skill accepts control commands to get data from other skills. This means if you use the speech recognition skill like Bing Speech Recognition, you can send a speech-to-text entry directly to the AimlBot text field with:

ControlCommand("AimlBot", "SetPhrase", $BingSpeech)

This skill also can execute a script when the chat result is returned. AimlBot can speak the result with:

Say($BotResponse)

-or-

SayEZB($BotResponse)

Another feature of this skill is moving a robot based on the code entered in the update-time file. An example phrase to activate this is: Move Forward.


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#65  

v21 has been updated

  • new ControlCommand added that allows specifying "memory" values of the current session programatically. For example, you can set the user's name with

ControlCommand("AimlBot", "SetValue", "name", "Mr Bob");

And when the chatbot is asked "What Is My Name?", the chatbot will respond with the name.

User-inserted image

  • There is a new option to view all memory settings

    User-inserted image

All settings and their values will be displayed....

User-inserted image

#66  

Is it possible to save customized AIML files with a project when uploading to Synthiam's cloud?

PRO
Synthiam
#67  

Not at the moment - it is a third-party engine that uses its files with the extension aiml that aren't part of the project. I believe the robot skill could somehow be modified to include the files, but it would take significant development effort to modify the third-party aiml engine.

#68  

I don't think you follow me. I mean that I have configured some 100 different AIML files for my Simone project. When I save the project, I want those AIML files saved WITH the project. That way, when people download my project, they get the AIML files as well. You allow saving of a servo profile, perhaps you can save the AIML files somewhere on your cloud. Maybe if they were zipped up into a single file. Otherwise I will have to use Google Drive, GitHub or some other similar file sharing service. Thoughts?

PRO
Synthiam
#69  

I did follow you. My response is still the same:). A project file and 100 individual random files are different. Being that the aimlbot is a 3rd party engine, it’s not designed to load data from an ARC project file. It doesn’t know what an ARC project file is. It knows it’s files. So significant development effort would be required to rewrite the 3rd party robot skill to somehow load and save data from a project file or a cloud.

#70  

I understand the complexity of having AimlBot load the AIML files itself. I agree that would probably be a lot of work.

But how about if you were to allow us to store a single extra file with the project file. That would be a bunch of AIML files all zipped together. Then the users would download both the project file and the zipped AIML files. And then the users would be required to manually unzip the file and put the individual files into the proper directory.  This way, there is no rewriting the skill, just allowing an extra file to be stored and downloaded with the project file. Yes? No?

PRO
Synthiam
#71   — Edited

Again, the engine is a 3rd party product. We’d need to coordinate to have that feature added. I have not said it couldn’t be done. It will require significant development effort and it would have to be added to their development scope. It’s just not something that could be added right away. It would take some planning and discussion but it can be done