FileDownloader
FileDownloader downloads source files of the documents and stores them locally. It's used for visual question answering to make the files available to other nodes.
FileDownloader is used for visual question answering. It downloads the source files and stores them in the path defined in the FILE_ROOT_PATH
environment variable. From there, other nodes, like PromptNode, can access them.
Basic Information
- Pipeline type: Query pipelines.
- Nodes that can precede it in a pipeline: Retriever, EntityExtractor, Ranker, RetrievalScoreAdjuster, JoinDocuments, InterleaveDocuments
- Nodes that can follow it in a pipeline: PromptNode
- Node input: Documents
- Node output:There's no output, but the source files of the documents are saved locally.
- Available node classes: FileDownloader
Usage Example
components:
- name: ImageDownloader
type: FileDownloader
params:
file_extensions:
- ".pdf"
...
pipelines:
- name: query
nodes:
- name: BM25Retriever
inputs: [Query]
- name: ImageDownloader
inputs: [BM25Retriever]
- name: PromptNode
inputs: [ImageDownloader]
...
Parameters
You can specify the following parameters for FileDownloader
in the pipeline YAML:
Parameter | Type | Possible Values | Description |
---|---|---|---|
file_extensions | A list of strings | .txt , .pdf | Specifies the extensions of the files to download. Mandatory. |
Updated 7 months ago
Related Links