Być bot-dostawcy z bot bot Libre platformy chmurowej
FAQ

How to define template responses?

w admin wysłany Mar 21 2014, 14:10

A template response is one that contains code in addition to text. The code is defined in the Bot Libre Self scripting language.

You can add a template response from the "Training & Chat Logs" page. You can even use a template response in a correction or learning response.

User: Whom do you love?
Bot:Template("I love {#self.love}")

or,

User: What is the hour?
Bot:Template("The current hour is {Date.time().hour}")

You can also program more sophisticated responses from the Scripts page.

You can also import AIML from either the Chat Logs page, or the Scripts page.


by aazxcqwe posted Jan 19 2015, 15:16
Hello,
I like the idea of having multiple passes. I think there may be a more simple way to do this, and maybe the bot already does it. I think it may be possible to simply associate all words to each other (again, perhaps how the brain works). There may be some exceptions to this where logical consistency is required, "is" versus "is not" for example might need to replace or negate the other. Then again, our brains probably simply adjust the weightings of these associations, with their sources referenced, like you have set the Self script up to be able to do.

So, could you suggest a way to test whether an association of multiple words exists. I've been constructing a script that would pair-wise check if each neighboring set of words are associated, but using the Get operator with the #next relationship. Would this be the most efficient way to do this?

Btw, one more request to set a default bot. (Still having to reselect bot through selecting several links pretty frequently.)
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2990, today: 1, week: 8, month: 43

by admin posted Jan 19 2015, 19:39
You can add any relationship between words that you wish. The system will define the #next and #previous relationships for words that appear together in sentences. Also a word can be an #instantiation of a #compound-word or have a #compound-word relationship for things like names "Barack Obama" and compound adjectives "very tall".

Not exactly sure what the end result you want is? I think Self is missing some operators though for more in depth queries, such as maybe "get relationship from :source to :target" (return how the objects are related, or "get relationship depth from :source to :target max :max" (find if/how deep the two objects are related), "all relationships from :source" (iterate over all relationships) "count relationships from :source of type :type" (return count of relationships).

I will add these to our todo list, if you can think of others, please reply to this thread.

For the default bot, do you mean from the web interface, or the Android interface? For the web interface you can click on browse, then "My Bots". Android also saves the last bot accessed in browse. You can also bookmark a bot by its id url in the web interface.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2992, today: 2, week: 5, month: 29

Identyfikator: 16008
Tagi: aiml, programming, scripting, templates
Wysłany: Mar 21 2014, 14:10
Aktualizacja: Feb 23 2016, 14:53
Odpowiedzi: 2
Widok: 4274, dziś: 3, tydzień: 9, miesiąc: 59
0 0 0.0/5