Присоединяйтесь к Сэп Libre проект с открытым исходным кодом на BotLibre.org
FAQ

What are labels, and how to reuse responses?

по admin опубликовано Feb 11 2016, 10:20

Bot Libre supports labels. A label lets you name a response and then reuse it just using the name. You can set the label for a response from the Training & Chat Logs page in your bot's Admin Console, or by importing a response list file.

To reference a label just put the label name as the response i.e. #hello (labels must start with a #).

Example labels in response list file

Hello Hello, how may I be of service? label: #hello Hi #hello How is it going? #hello

You can also use AIML or Self SRAI redirects in a response, or in a response list file. Labels are simpler and more efficient than AIML SRAI redirects as they are just an indexed reference to the response, and do not require a recursive evaluation.

You can use Patterns, Formulas, and even AIML in a response list file, and in the Training & Chat Logs.

Example AIML SRAI in a response list file

Hello Hello, how may I be of service? Pattern:"^ hello ^" Formula:"{redirect "hello"}" <pattern>^ hello ^</pattern> <template><srai>hello</srai></template>


by Billnichols posted Feb 12 2016, 11:07

I entered your chat log exactly as posted.

Hello
Hello, how may I be of service?
label: #hello

Hi
#hello

How is it going?
#hello

Here is my conversation:

You: hello

Bot: Hello, how may I be of service?

You: hi

Bot: #hello

You: how is it going?

Bot: #hello

So it looks like the label isn't getting picked up as such.  I can't find the version I'm running based on the ant file or other files I've browsed.  I downloaded the engine on Feb 2.

 


Thumbs up: 1, thumbs down: 1, stars: 3.5
Views: 1175, today: 0, week: 9, month: 15

by admin posted Feb 12 2016, 14:14
I tested the same log on the website and it worked correctly as expected.

Your issue is your are importing the file as a "Chat Log" not as a "Response List". The chat log format is for a conversation log, the bot can learn from a chat log in context when learning is enabled. What you want to load is a response list, which is a list of question/response pairs with additional info like keywords, labels, etc.

The issue is the test GUI that you are using loads files as chat logs, not as response lists.
To fix the issue in the BotFrame class change the following line of code,
getBot().awareness().getSense(TextEntry.class).loadChatFile(file, "Chat Log", "", true, false);

to,

getBot().awareness().getSense(TextEntry.class).loadChatFile(file, "Response List", "", false, true);

The test GUI is just used for testing, so kind of out of date in places. If you would like to updated the UI please feel free to join the project on GitHub.

Updated: Feb 12 2016, 14:15
Thumbs up: 0, thumbs down: 2, stars: 2.0
Views: 1130, today: 0, week: 11, month: 19

Идентификатор: 12117061
Теги: labels, srai, aiml, training, response lists
Опубликовано: Feb 11 2016, 10:20
Обновлено: Feb 11 2016, 10:21
Ответы: 2
Вид: 1357, сегодня: 1, неделю: 18, месяц: 29
Я уверен, что
Вывесить флаг как оскорбительное, или в нарушение правил сайта