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

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 FileDownloaderin the pipeline YAML:

ParameterTypePossible ValuesDescription
file_extensionsA list of strings.txt, .pdfSpecifies the extensions of the files to download.
Mandatory.