Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
OurBuilding Ambient Agents with LangGraph course is now available on LangChain Academy!
Open on GitHub

Wolfram Alpha

WolframAlpha is an answer engine developed byWolfram Research.It answers factual queries by computing answers from externally sourced data.

This page covers how to use theWolfram Alpha API within LangChain.

Installation and Setup

  • Install requirements with
pip install wolframalpha
  • Go to wolfram alpha and sign up for a developer accounthere
  • Create an app and get yourAPP ID
  • Set your APP ID as an environment variableWOLFRAM_ALPHA_APPID

Wrappers

Utility

There exists a WolframAlphaAPIWrapper utility which wraps this API. To import this utility:

from langchain_community.utilities.wolfram_alphaimport WolframAlphaAPIWrapper

For a more detailed walkthrough of this wrapper, seethis notebook.

Tool

You can also easily load this wrapper as a Tool (to use with an Agent).You can do this with:

from langchain_community.agent_toolkits.load_toolsimport load_tools
tools= load_tools(["wolfram-alpha"])
API Reference:load_tools

For more information on tools, seethis page.


[8]ページ先頭

©2009-2025 Movatter.jp