partition_local_file
Convert local files into structured JSON or Markdown data using AI-powered transformation strategies for documents, PDFs, and images.
Instructions
Transform a local file into structured data using the Unstructured API.
Args:
input_file_path: The absolute path to the file.
output_file_dir: The absolute path to the directory where the output file should be saved.
strategy: The strategy for transformation.
Available strategies:
VLM - most advanced transformation suitable for difficult PDFs and Images
hi_res - high resolution transformation suitable for most document types
fast - fast transformation suitable for PDFs with extractable text
auto - automatically choose the best strategy based on the input file
vlm_model: The VLM model to use for the transformation.
vlm_model_provider: The VLM model provider to use for the transformation.
output_type: The type of output to generate. Options: 'json' for json
or 'md' for markdown.
Returns:
A string containing the structured data or a message indicating the output file
path with the structured data.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_file_path | Yes | ||
| output_file_dir | Yes | ||
| strategy | No | vlm | |
| vlm_model | No | claude-3-5-sonnet-20241022 | |
| vlm_model_provider | No | anthropic | |
| output_type | No | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |