跳到主要内容

WolframAlpha 工具

WolframAlpha 工具将您的 agents 和 chains 连接到 WolframAlpha 最先进的计算智能引擎。

设置

您需要从 WolframAlpha 门户创建一个应用并获取 appid

使用方法

import { WolframAlphaTool } from "@langchain/community/tools/wolframalpha";

const tool = new WolframAlphaTool({
appid: "YOUR_APP_ID",
});

const res = await tool.invoke("What is 2 * 2?");

console.log(res);

API 参考


此页是否对您有帮助?


您也可以留下详细的反馈 在 GitHub 上.

© . This site is unofficial and not affiliated with LangChain, Inc.
这些文档随着 LangChain v1.0 在 2025 年 10 月的发布而弃用,并且不再维护。 请访问 v1.0 文档