Website update - AIML 2.0, Self 2.0, scaling
The website was updated today. The update included more support for AIML 2.0 features, and some scalability fixes that will hopefully fix the memory issues we have been having for the last couple weeks. The update also included some other minor fixes and enhancements.
Our AIML 2.0 support is now almost complete,
Support for several new tags was added.
Pattern side <set>
Pattern side <set> tag. This allows for pattern to be defined on predefined sets. If the word in place of <set> is part of the predefined set, then the pattern will be evaluated with the word becoming the <star/> variable in the template.
This lets you define patterns for wildcard types, such as names, colors, numbers, things, descriptions, actions, etc.
<pattern>are you <set>name</set></pattern>
<template>No my name is <bot name="name"/>.</template>
Note that in BOT libre, there are no set files. Instead sets use the bot's knowledge base and the #meaning and #instantiation relationships. So, if the word is an #instantiation of #name it will be part of the set.
Pattern side <bot> and <get>
You can now use the <bot> and <get> tags in a pattern. This lets you define more dynamic patterns.
<pattern>are you <bot name="name"/></pattern>
<template>Yes, that is my name.</template>
The <map> tag can be used in a template to map one value to another.
<pattern>what comes after <set>number</set></pattern>
<template><map name="next"><star/></map> comes after <star/></template>
Note that in BOT libre, there are no map files. Instead maps use the bot's knowledge base and lookup relationships between the objects. Ever word has a meaning, which is an object, that can have relationships to any other object. BOT libre also extends the map tag with a value that allows relationships to be set as well. Previously you could only access the knowledge base in Self, but map lets you access it to some degree in AIML.
<pattern>* is a color</pattern>
<template>I understand, <star/> is a color.<think><map name="meaning"><value><star/></value><star/></map><map name="instantiation" value="color"><map name="meaning"><star/></map></map></think></template>
SRAIX allows a remote call to be made to another bot or a service. SRAIX will forward the question text to the remote service and return the response. SRAIX can take either a bot, botid, or service. If none is given the Pannous service is used by default. The bot name or botid will send the request to the BOT libre server, a server can also be given to call another server that supports the AIML SRAIX API defined by Program AB (which BOT libre now supports).
BOT libre currently supports the following services,
pannous - http://pannous.com (send request to Pannous web API)
<pattern>what is *</pattern>
<pattern>what does brain bot think of *</pattern>
<template>He thinks, <sraix bot="Brain Bot"><star/></sraix></template>
You can also pass an API key using the apikey attribute, which some services may require.
You can also pass a hint attribute, that is used by some services such as Wikidata.
<pattern>what country is * in</pattern>
<template><star/> is in <sraix service="wikidata" hint="country"><star/></sraix></template>
AIML Web API
In addition to its own web API, BOT libre now also supports the web API defined by the AIML 2.0 reference implementation Program AB. This let you call BOT libre bots from any AIML 2.0 supporting implementation. It also lets your BOT libre bot call any AIML 2.0 supporting implementation.