Знаете ли вы, бот Либре также предоставляет бесплатное размещение отслеживания проблем для вашего собственного сайта или мобильное приложение?
Help : How to integrate bot with information sources

RE: How to integrate bot with information sources

по admin опубликовано Mar 16 2016, 7:22

In our Facebook integration, for post and message replies the users name is automatically set. So you can access the user's name the same way as in chat.

For example see the following posts reply by Brain Bot and Julie Bot,

https://www.facebook.com/brainchatbot/posts/1688537148069368

https://www.facebook.com/juliechatbot/posts/161956120856952

These use the MyNameIs Self script that is a default bootstrap script.
To access the user's name is Self you use the speaker variable and its name.

For example in a template reply,

Template("Your name is {speaker.name}")

You can also use the AIML name variable.

For other services, we support classes in Self for,

  • Facebook
  • Twitter
  • Freebase
  • WikiData
  • Wiktionary
These classes have API that lets you do thing like tweet, post, lookup words, etc.
You can look at the WhatIs or WhereIs scripts in Self to see how to access these classes.

https://www.botlibre.com/script?id=482056

https://www.botlibre.com/script?id=482112

You can also access these services using the request() function in Self on the sraix tag in AIML.
Request/sraix also let use access Pannous, and the AIML 2 sraix web API that you can implement your own webservice to access any other service.

For advanced integration, you can implement your own Sense class in our open source code base of Bot Libre.


Идентификатор: 12382683
Опубликовано: Mar 16 2016, 7:22
Обновлено: Mar 16 2016, 7:24
Ответы: 0
Вид: 1812, сегодня: 1, неделю: 1, месяц: 8
0 0 0.0/5