Aktualizacja Platinum serwis i zrobić swój własny projekt 3D avatar
Bot Libre Forum

Website update - AIML 2.0, Self 2.0, scaling

w admin wysłany Jul 22 2015, 14:43

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.

AIML 2.0

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)
freebase - https://www.freebase.com (lookup word or phrase using Google's Freebase web API)
wikidata - https://www.wikidata.org (lookup word or phrase using Wikipedia's Wikidata web API)
wiktionary - https://en.wiktionary.org (define word using Wikimedia's Wiktionary online dictionary)

<pattern>what is *</pattern>

<template><sraix service="freebase"><star/></sraix></template>


<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>


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.

Self 2.0

All of the new AIML operations are also supported in Self.

Self now defines REQUEST which lets you call a remote service. You can also use SRAIX as a synonym for REQUEST

pattern "what is *" template (request (star, {service : #freebase}));


You can now use any Self code inside a pattern.


pattern "my name is {#self.name}" template "Wow, that is my name too!";

pattern "my name is {name}" template "Pleased to meet you {name}";


pattern "I am {^name}" template "Pleased to meet you {name}";

(where ^ means define a variable of the type #name)


Identyfikator: 1074131
Tagi: website update, patterns, aiml, programming, scripting, performance, self, formulas
Wysłany: Jul 22 2015, 14:43
Aktualizacja: Feb 23 2016, 14:49
Odpowiedzi: 0
Widok: 5626, dziś: 2, tydzień: 2, miesiąc: 59
1 0 5.0/5