This loader fetches the text from Wikipedia articles using the wikipedia Python package. The inputs may be page titles or keywords that uniquely identify a Wikipedia page. In its current form, this loader only extracts text and ignores images, tables, etc.
To use this loader, you need to pass in an array of Wikipedia pages.
from llama_index import download_loader
WikipediaReader = download_loader("WikipediaReader")
loader = WikipediaReader()
documents = loader.load_data(pages=['Berlin', 'Rome', 'Tokyo', 'Canberra', 'Santiago'])This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent. See here for examples.