Skip to main content

Wikipedia tool

The WikipediaQueryRun tool connects your agents and chains to Wikipedia.

Usage

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 Reference:


Help us out by providing feedback on this documentation page: