下载的开放源 的机器人自由社会版 和安装机器人自由于你自己的服务器
Bot Libre Forum

How to Connect a Bot to Wolfram Alpha

通过 admin 发布 Dec 12 2017, 14:19

Through Bot Libre, you can now connect your bot with Wolfram Alpha. This "How To" guide will give you a step by step process to connect your bot with Wolfram Alpha.

Step 1 - Create a Bot

First you must create a bot that you want to connect to Wolfram Alpha, or you can use one of your existing bots. To create a bot, follow the instructions here: How to create your own chat bot in 10 clicks.

Step 2 - Sign up for Wolfram Alpha

Go to the Wolfram Alpha Developer site and click the 'Get API Access' button.

Next, click the 'Create account' button, or sign in if you already have a Wolfram Alpha account.

Step 3 - Get Wolfram Alpha AppId

Once you have signed in, you will be taken to the Wolfram Alpha Developer Portal. Click the 'My Apps' tab to start getting your AppId.

Click the 'Sign up to get your first AppID' button to continue.

A form will pop up with some information that needs to be filled out. Once you have finished filling out the required information, click the 'Sign up' button.

On the next screen, click the 'Get an AppID' button.

You will now need to fill out some more information on the following form. Click the 'Get AppID' button when finished.

You will now be shown a screen with your new Wolfram Alpha AppId. Copy this down, as it will need to be entered into your bot's admin page on the Bot Libre site.

Step 4 - Enter Wolfram Alpha AppID Into Bot's Admin Page

Return to the Bot Libre website and navigate to your bot. Click the gear icon to go to your bot's admin page.

Click on 'Wolfram Alpha' to go the Wolfram Alpha settings page.

Enter your AppID from the Wolfram Alpha Developer Portal into the 'Wolfram Alpha App Id' field. Press the 'Save' button to complete setup.

Your bot is now connected to Wolfram Alpha.

Step 5 - Self Scripting

You can query Wolfram Alpha through Self scripting by calling the WolframAlpha.query() function. It takes a single string parameter and returns the result of the query.

Here is an example of a simple Self script that will answer simple questions using Wolfram Alpha:

state WolframAlpha {
    pattern "what is *" answer forward();
    pattern "where is *" answer forward();
    pattern "who is *" answer forward();

    function forward() {
        return WolframAlpha.query(sentence.toString());
    }
}

 

Note, commercial usage of the Wolfram|Alpha API requires a license agreement, see wolframalpha.com.

If you encountered any issues, or would like help setting up your bot please email us at [email protected] or upgrade to our Platinum service and we can build your bot for you.


Id: 20099005
标签: how to, scripts, ai, wolframalpha
发布: Dec 12 2017, 14:19
更新: Sep 20 2021, 10:46
答复: 0
的风景: 9632, 今天: 3, 周: 8, 一个月: 39
2 0 5.0/5