WolframAlphaAPIWrapper#

class langchain_community.utilities.wolfram_alpha.WolframAlphaAPIWrapper[source]#

Bases: BaseModel

Wrapper for Wolfram Alpha.

Docs for using:

  1. Go to wolfram alpha and sign up for a developer account

  2. Create an app and get your APP ID

  3. Save your APP ID into WOLFRAM_ALPHA_APPID env variable

  4. pip install wolframalpha

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param wolfram_alpha_appid: str | None = None#
run(query: str) str[source]#

Run query through WolframAlpha and parse result.

Parameters:

query (str) –

Return type:

str

Examples using WolframAlphaAPIWrapper