DeepsetSourceToBase64Image

Convert images to base64-encoded strings.

Basic Information

  • Pipeline type: Query
  • Type: deepset_cloud_custom_nodes.converters.file_to_image.DeepsetSourceToBase64Image
  • Components it can connect with:
    • Any component that outputs a list of paths
    • Any component that accepts a list of Base64Image objects as input
    • DeepsetFileDownloader: DeepsetPDFDocumentToBase64Image can receive documents from DeepsetFileDownloader.
    • DeepsetAzureOpenAIVisionGenerator: This Generator can receive Base64Image objects to run visual question answering on them.

Inputs

NameTypeDescription
sourcesList of strings, Paths, or ByteStream objectsList of image file paths (string or Path) or ByteStream objects to convert to base64-encoded images.

Outputs

NameTypeDescription
documentsList of Document objectsA list of text documents.
base64_imagesList of Base64Image objectsA list of base64-encoded images corresponding to the documents they were converted from.

Overview

DeepsetSourceToBase64Image is a converter used in visual question answering pipelines to extract images from the sources. These images are then sent to a visual Generator that can process them.

Converting sources doesn't happen if the source is not a string, Path, or a ByteStream object.

Parameters

Init Parameters

These are the parameters you can configure in Pipeline Builder:


ParameterTypePossible valuesDescription
detailLiteralauto
low
hight
Default: auto
Controls how the model processes the image and generates its textual understanding. By default, the model uses the auto setting which checks the image input size and chooses the best setting to use. For details see OpenAI documentation.
Required.

Run Method Parameters

These are the parameters you can configure for the component's run() method. This means you can pass these parameters at query time through the API, in Playground, or when running a job. For details, see Modify Pipeline Parameters at Query Time.


ParameterTypeDescription
sourcesList of Path or ByteStreamA list of image file paths (string or Path) or ByteStream objects to convert into base64-encoded images.
Required