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:


Was this page helpful?


You can also leave detailed feedback on GitHub.