【问题标题】:How to use program AB如何使用程序 AB
【发布时间】:2016-08-18 06:27:28
【问题描述】:

我已经下载了 program-ab-0.0.4.3,以便我可以使用 AIML 2.0 的功能。

我想根据用户输入进行 API 调用。关于如何操作的任何指导?

我读到了 oob 标签和 sraix,program-ab-0.0.4.3 的 aiml 文件夹中有一些 oob 标签示例,但是当我运行它以了解它的工作原理时,它只是输出标签作为结果

    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>

请帮助我了解如何根据用户输入调用任何 API,并根据 API 响应向用户提供自定义输出

谢谢

【问题讨论】:

    标签: chatbot aiml


    【解决方案1】:

    您的 api 调用应如下所示。如果您使用 XML 来传递数据,请将服务更改为 XML。

    更多详情请参考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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-07
      • 1970-01-01
      相关资源
      最近更新 更多