跳到主要内容

Wikipedia 工具

WikipediaQueryRun 工具将您的 Agent 和链连接到 Wikipedia。

使用方法

import { WikipediaQueryRun } from "@langchain/community/tools/wikipedia_query_run";

const tool = new WikipediaQueryRun({
topKResults: 3,
maxDocContentLength: 4000,
});

const res = await tool.invoke("Langchain");

console.log(res);

API 参考


此页面是否对您有帮助?


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

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