Read Documents
Controlled node
Overview
This node is used to access document contents from your library. The files can be chosen from the library using the side panel. Alternatively select the file using the files input.
The ReadDocuments node is useful when you need to process multiple documents simultaneously and optionally combine their chunks into a single list.
Inputs
Input | Type | Description | Default |
---|---|---|---|
Files | File | Files containing information | - |
Run | Event | Fires when the node starts running | - |
Done | Event | Fires when the node finishes running | - |
Text | List | Text content of the file. By default this will be a list of lists with the text content of the files. Combine the list of lists into one list using the flatten result flag | - |
Panel Controls
The show node panel allows you to choose the files to read from your library.
Larger documents may require reading in "chunks". Toggle the chunk option in the side panel to chunk by "default", "count", "separator", "structure" or "divide". This will return the file text content in a list of chunks separated by option.
Chunking Options
The ReadDocuments node supports various chunking options to process large documents. These options can be set in the side panel and include:
Default: Splits the document into chunks of 700 words by default.
Count: Splits the document into chunks of a specified number of elements (words, sentences, or paragraphs).
Separator: Splits the document based on a specified separator (e.g., comma, period).
Structure: Splits the document based on its structure (e.g., sentences, paragraphs, words).
Divide: Divides the document (e.g. sentences, paragraph, words) into a specified number of chunks.
Flatten Result
The results will be returned as a list of lists per document that is read. The result can be combined into one list using the flatten result flag.