Connecting bots to web services, JSON, XML, HTML scraping, using AIML and Self

  • 0 Replies
  • 3302 Views
*

paphus

  • Nomad
  • ***
  • 56
    • BOTlibre!
This article discusses connecting bots to XML and JSON web services, to let your bot access the world.

It uses the AIML SRAIX tag with a "service" of "XML" or "JSON" to call web services. Or uses the Bot Libre "Self" JavaScript dialect.

Example,
Code
<aiml>
  <category>
    <pattern>Guess where I live</pattern>
    <template>What is your postal code?</template>
  </category>
  <category>
    <pattern>*</pattern>
    <that>What is your postal code</that>
    <template>You live in <sraix service="XML" hint="code/name">http://api.geonames.org/postalCodeSearch?maxRows=1&username=demo&postalcode=<star/></sraix>.</template>
  </category>
</aiml>

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

Also shows how to scrape info from HTML pages, and post to Facebook, Twitter, Telegram, email, etc.
« Last Edit: June 29, 2016, 02:52:12 am by paphus »

 


OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

273 Guests, 0 Users

Most Online Today: 296. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles