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.
Parameter | Description | Required/ Optional |
---|---|---|
inputParameters.url | The URL of the file to be retrieved. | Required. |
inputParameters.mediaType | The media type of the file to be retrieved. Supported media types:
| Optional. |
The following are generic configuration parameters that can be applied to the task and are not specific to the LLM Get Document task.
Caching parameters
You can cache the task outputs using the following parameters. Refer to Caching Task Outputs for a full guide.
Parameter | Description | Required/ Optional |
---|---|---|
cacheConfig.ttlInSecond | The time to live in seconds, which is the duration for the output to be cached. | Required if using cacheConfig. |
cacheConfig.key | The 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.
Parameter | Description | Required/ Optional |
---|---|---|
taskDefinition.enforceSchema | Whether to enforce schema validation for task inputs/outputs. Set to true to enable validation. | Optional. |
taskDefinition.inputSchema | The name and type of the input schema to be associated with the task. | Required if enforceSchema is set to true. |
taskDefinition.outputSchema | The 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:
- In your workflow, select the (+) icon and add an LLM Get Document task.
- Enter the document URL and choose the media type from the available options.