Você sabia que o Bot Livre também oferece acesso gratuito hospedado bate-papo ao vivo para seu próprio website ou aplicativo para celular?
Bot Libre Dev

AIML 2.0 SRIAX tag

por sreekar postado May 22 2017, 9:32

Hi , 

I am trying to develop an chat application , I need some inputs for SRAIX tag through which i can access external rest services ,

can any one help me in this ?

Thanks,

Sreekar c


by admin posted May 22 2017, 13:23
SRAIX is meant more for access AIML 2 compatible chat bot APIs, than generate web services.

I would recommend using Self to access web services,

See,
https://www.botlibre.com/forum-post?id=13020078

AIML can only process text, where as Self is object oriented, and can process JSON and XML.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2390, today: 1, week: 5, month: 24

by sreekar posted May 23 2017, 3:11

Hi,

    Thanks for your reply 

I want to generate a Jon response like this ,

{"postalCodes":[{"adminCode2":"037","adminCode1":"CA","adminName2":"Los Angeles County","lng":-118.406477,"countryCode":"US","postalCode":"90210","adminName1":"California","placeName":"Beverly Hills","lat":34.090107}]}

I tried but i am getting result instead of this Json response, can you share me more examples so that i can create a Json response using this Geo name services.

Thanks,

Sreekar c


Updated: May 25 2017, 7:09
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2358, today: 1, week: 5, month: 28

by admin posted May 23 2017, 16:35
There are lots of Self examples here,

https://www.botlibre.com/script?category=Self

Here is an example for Geonames,

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

The Http.requestXML() return an object converted from the XML.

or Http.requestJSON() returns an object converted from the JSON.

You can use JSON.stringify(object) to convert an object to a JSON string to see what data it has,

debug(JSON.stringify(object));

This would dump the object to the chat's log.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2308, today: 1, week: 6, month: 27

by sreekar posted May 25 2017, 7:04

Hi,

Thanks for your help,

i want to know more about how Bot Libre is using GET and POST API's in detail, 

can you help in knowing this ?

Thanks, 

Sreekar c


Updated: May 25 2017, 7:09
Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2133, today: 1, week: 3, month: 25

Id: 17297233
Tags: aiml, botlibre.org
Postado: May 22 2017, 9:32
Atualizado: May 22 2017, 13:23
Respostas: 4
Pontos de vista: 2832, hoje: 2, semana: 4, mês: 29
1 0 5.0/5