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][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

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