2

I have downloaded program-ab-0.0.4.3, so that I can make use of AIML 2.0 features.

I want to make a API call based on users input. Any guidance on how do i do it ?

I read about oob tags and sraix, there are some oob tag examples in aiml folder in program-ab-0.0.4.3, but when i run it to understand how it works, it just outputs the tag as a result

    Ex: Human: what is the weather like?
    Sraix ‘WHAT+IS+THE+WEATHER+LIKE’ failed
    Robot: I used my lifeline to ask another robot, but he didn’t know.
    Perhaps we should try a web search.
    <oob><search>what is the weather like</search></oob>

Please help me to know how do i call any API based on user input and give customized output to user based on API response

Thanks

1 Answers1

0

Your api call should look something like this. Change service to XML if you are using an XML to pass data.

For more details refer here https://www.botlibre.com/forum-post?id=13020078

<category>
        <pattern>*</pattern>
        <that>What is your postal code</that>
        <template>You live in <sraix service="JSON" hint="code/name">URL_GOES_HERE</sraix>.</template>
    </category>
Bhavani Ravi
  • 2,130
  • 3
  • 18
  • 41