Wikipedia Reader
Parameters and methods of WikipediaReader, which reads Wikipedia article summaries into documents.
WikipediaReader reads Wikipedia article summaries.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
chunking_strategy | Optional[ChunkingStrategy] | FixedSizeChunking() | Strategy used to chunk documents |
auto_suggest | bool | True | Let Wikipedia suggest a matching page title for the topic |
WikipediaReader also accepts the base Reader constructor parameters.
Methods
read()
Reads the summary of a Wikipedia topic and returns a list of documents.
| Parameter | Type | Default | Description |
|---|---|---|---|
topic | str | Required | Topic to look up on Wikipedia |
async_read()
Async variant of read(). Accepts the same parameters.