Join Bot Libre's Partner and Affiliate program and support our free open platform
Bot Libre Forum

How to Connect a Bot to Wolfram Alpha

by admin posted 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.


Id: 20099005
Tags: how to, wolframalpha, scripts, ai
Posted: Dec 12 2017, 14:19
Updated: Aug 9, 14:12
Replies: 0
Views: 882, today: 1, week: 1, month: 41
I'm sure
Flag post as offensive, or in violation of site rules