Parameters
TextReader also accepts the base Reader constructor parameters.
Methods
read()
Reads a text file and returns a list of documents.
async_read()
Async variant of read(). Accepts the same parameters.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Parameters and methods of TextReader, which reads text files into documents.
| Parameter | Type | Default | Description |
|---|---|---|---|
chunking_strategy | Optional[ChunkingStrategy] | FixedSizeChunking() | Strategy used to chunk documents |
TextReader also accepts the base Reader constructor parameters.
read()| Parameter | Type | Default | Description |
|---|---|---|---|
file | Union[Path, IO[Any]] | Required | Path to the text file or a file-like object |
name | Optional[str] | None | Name override for the resulting documents |
async_read()read(). Accepts the same parameters.Was this page helpful?