You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/docs/docs/integrations/providers/wolfram_alpha.mdx

40 lines
1.1 KiB
Markdown

# Wolfram Alpha
>[WolframAlpha](https://en.wikipedia.org/wiki/WolframAlpha) is an answer engine developed by `Wolfram Research`.
> It answers factual queries by computing answers from externally sourced data.
This page covers how to use the `Wolfram Alpha API` within LangChain.
## Installation and Setup
- Install requirements with
```bash
pip install wolframalpha
```
- Go to wolfram alpha and sign up for a developer account [here](https://developer.wolframalpha.com/)
- Create an app and get your `APP ID`
- Set your APP ID as an environment variable `WOLFRAM_ALPHA_APPID`
## Wrappers
### Utility
There exists a WolframAlphaAPIWrapper utility which wraps this API. To import this utility:
```python
from langchain_community.utilities.wolfram_alpha import WolframAlphaAPIWrapper
```
For a more detailed walkthrough of this wrapper, see [this notebook](/docs/integrations/tools/wolfram_alpha).
### Tool
You can also easily load this wrapper as a Tool (to use with an Agent).
You can do this with:
```python
from langchain.agents import load_tools
tools = load_tools(["wolfram-alpha"])
```
For more information on tools, see [this page](/docs/modules/tools/).