Skip to main content

LLM Get Document

The LLM Get Document task is used to retrieve the content of a specified document for further data processing using AI tasks. It supports a wide range of media types and allows integration with various file formats to facilitate comprehensive data handling and processing.

The LLM Get Document task fetches a document from a specified URL based on the provided media type. It supports different formats, ensuring the retrieval of various types of documents. The task initiates a GET request to the URL and retrieves the document in the specified format, which is then available for subsequent AI-driven tasks or data processing.

Task parameters

Configure these parameters for the LLM Get Document task.

ParameterDescriptionRequired/ Optional
inputParameters.urlThe URL of the file to be retrieved.Required.
inputParameters.mediaTypeThe media type of the file to be retrieved. Supported media types:
  • application/pdf
  • text/html
  • text/plain
  • application/json
Optional.

Caching parameters

You can cache the task outputs using the following parameters. Refer to Caching Task Outputs for a full guide.

ParameterDescriptionRequired/ Optional
cacheConfig.ttlInSecondThe time to live in seconds, which is the duration for the output to be cached.Required if using cacheConfig.
cacheConfig.keyThe cache key is a unique identifier for the cached output and must be constructed exclusively from the task’s input parameters.
It can be a string concatenation that contains the task’s input keys, such as ${uri}-${method} or re_${uri}_${method}.
Required if using cacheConfig.

Schema parameters

You can enforce input/output validation for the task using the following parameters. Refer to Schema Validation for a full guide.

ParameterDescriptionRequired/ Optional
taskDefinition.enforceSchemaWhether to enforce schema validation for task inputs/outputs. Set to true to enable validation.Optional.
taskDefinition.inputSchemaThe name and type of the input schema to be associated with the task.Required if enforceSchema is set to true.
taskDefinition.outputSchemaThe name and type of the output schema to be associated with the task.Required if enforceSchema is set to true.

Task configuration

This is the task configuration for an LLM Get Document task.

{
"name": "get_document_task",
"taskReferenceName": "get_document_task_ref",
"inputParameters": {
"url": "${workflow.input.url}",
"mediaType": "application/pdf"
},
"type": "GET_DOCUMENT"
}

Adding an LLM Get Document task in UI

To add an LLM Get Document task:

  1. In your workflow, select the (+) icon and add an LLM Get Document task.
  2. Enter the document URL and choose the media type from the available options.

LLM Get Document Task - UI