Skip to main content

Class: LlamaParseReader

Represents a reader for parsing files using the LlamaParse API. See https://github.com/run-llama/llama_parse

Extends

Constructors

new LlamaParseReader()

new LlamaParseReader(params?): LlamaParseReader

Parameters

params?: Partial<Omit<LlamaParseReader, "apiKey" | "language">> & object

Returns

LlamaParseReader

Overrides

FileReader.constructor

Defined in

packages/cloud/reader/dist/index.d.ts:77

Properties

optional annotateLinks: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:49


apiKey

apiKey: string

Defined in

packages/cloud/reader/dist/index.d.ts:15


auto_mode?

optional auto_mode: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:54


auto_mode_trigger_on_image_in_page?

optional auto_mode_trigger_on_image_in_page: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:55


auto_mode_trigger_on_regexp_in_page?

optional auto_mode_trigger_on_regexp_in_page: string

Defined in

packages/cloud/reader/dist/index.d.ts:58


auto_mode_trigger_on_table_in_page?

optional auto_mode_trigger_on_table_in_page: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:56


auto_mode_trigger_on_text_in_page?

optional auto_mode_trigger_on_text_in_page: string

Defined in

packages/cloud/reader/dist/index.d.ts:57


azureOpenaiApiVersion?

optional azureOpenaiApiVersion: string

Defined in

packages/cloud/reader/dist/index.d.ts:52


azureOpenaiDeploymentName?

optional azureOpenaiDeploymentName: string

Defined in

packages/cloud/reader/dist/index.d.ts:50


azureOpenaiEndpoint?

optional azureOpenaiEndpoint: string

Defined in

packages/cloud/reader/dist/index.d.ts:51


azureOpenaiKey?

optional azureOpenaiKey: string

Defined in

packages/cloud/reader/dist/index.d.ts:53


baseUrl

baseUrl: string

Defined in

packages/cloud/reader/dist/index.d.ts:16


bbox_bottom?

optional bbox_bottom: number

Defined in

packages/cloud/reader/dist/index.d.ts:59


bbox_left?

optional bbox_left: number

Defined in

packages/cloud/reader/dist/index.d.ts:60


bbox_right?

optional bbox_right: number

Defined in

packages/cloud/reader/dist/index.d.ts:61


bbox_top?

optional bbox_top: number

Defined in

packages/cloud/reader/dist/index.d.ts:62


boundingBox?

optional boundingBox: string

Defined in

packages/cloud/reader/dist/index.d.ts:33


checkInterval

checkInterval: number

Defined in

packages/cloud/reader/dist/index.d.ts:18


continuousMode?

optional continuousMode: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:47


disable_image_extraction?

optional disable_image_extraction: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:63


disableOcr?

optional disableOcr: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:43


disableReconstruction?

optional disableReconstruction: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:44


doNotCache?

optional doNotCache: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:25


doNotUnrollColumns?

optional doNotUnrollColumns: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:27


extract_charts?

optional extract_charts: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:64


fastMode?

optional fastMode: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:26


gpt4oApiKey?

optional gpt4oApiKey: string

Defined in

packages/cloud/reader/dist/index.d.ts:32


gpt4oMode

gpt4oMode: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:31


guess_xlsx_sheet_name?

optional guess_xlsx_sheet_name: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:65


html_make_all_elements_visible?

optional html_make_all_elements_visible: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:66


html_remove_fixed_elements?

optional html_remove_fixed_elements: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:67


html_remove_navigation_elements?

optional html_remove_navigation_elements: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:68


http_proxy?

optional http_proxy: string

Defined in

packages/cloud/reader/dist/index.d.ts:69


ignoreErrors

ignoreErrors: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:35


input_url?

optional input_url: string

Defined in

packages/cloud/reader/dist/index.d.ts:70


inputS3Path?

optional inputS3Path: string

Defined in

packages/cloud/reader/dist/index.d.ts:45


invalidateCache?

optional invalidateCache: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:24


isFormattingInstruction?

optional isFormattingInstruction: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:48


language

language: ParserLanguages[]

Defined in

packages/cloud/reader/dist/index.d.ts:21


max_pages?

optional max_pages: number

Defined in

packages/cloud/reader/dist/index.d.ts:71


maxTimeout

maxTimeout: number

Defined in

packages/cloud/reader/dist/index.d.ts:19


output_pdf_of_document?

optional output_pdf_of_document: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:72


outputS3PathPrefix?

optional outputS3PathPrefix: string

Defined in

packages/cloud/reader/dist/index.d.ts:46


pagePrefix?

optional pagePrefix: string

Defined in

packages/cloud/reader/dist/index.d.ts:29


pageSeparator?

optional pageSeparator: string

Defined in

packages/cloud/reader/dist/index.d.ts:28


pageSuffix?

optional pageSuffix: string

Defined in

packages/cloud/reader/dist/index.d.ts:30


parsingInstruction?

optional parsingInstruction: string

Defined in

packages/cloud/reader/dist/index.d.ts:22


premiumMode?

optional premiumMode: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:41


resultType

resultType: ResultType

Defined in

packages/cloud/reader/dist/index.d.ts:17


skipDiagonalText?

optional skipDiagonalText: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:23


splitByPage

splitByPage: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:36


stdout?

optional stdout: WriteStream

Defined in

packages/cloud/reader/dist/index.d.ts:76


structured_output?

optional structured_output: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:73


structured_output_json_schema?

optional structured_output_json_schema: string

Defined in

packages/cloud/reader/dist/index.d.ts:74


structured_output_json_schema_name?

optional structured_output_json_schema_name: string

Defined in

packages/cloud/reader/dist/index.d.ts:75


takeScreenshot?

optional takeScreenshot: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:42


targetPages?

optional targetPages: string

Defined in

packages/cloud/reader/dist/index.d.ts:34


useVendorMultimodalModel

useVendorMultimodalModel: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:37


vendorMultimodalApiKey?

optional vendorMultimodalApiKey: string

Defined in

packages/cloud/reader/dist/index.d.ts:39


vendorMultimodalModelName?

optional vendorMultimodalModelName: string

Defined in

packages/cloud/reader/dist/index.d.ts:38


verbose

verbose: boolean

Defined in

packages/cloud/reader/dist/index.d.ts:20


webhookUrl?

optional webhookUrl: string

Defined in

packages/cloud/reader/dist/index.d.ts:40

Methods

getImages()

getImages(jsonResult, downloadPath): Promise<Record<string, any>[]>

Downloads and saves images from a given JSON result to a specified download path. Currently only supports resultType = "json"

Parameters

jsonResult: Record<string, any>[]

The JSON result containing image information.

downloadPath: string

The path to save the downloaded images.

Returns

Promise<Record<string, any>[]>

A Promise that resolves to an array of image objects.

Defined in

packages/cloud/reader/dist/index.d.ts:107


loadData()

loadData(filePath): Promise<Document<Metadata>[]>

Parameters

filePath: string

Returns

Promise<Document<Metadata>[]>

Inherited from

FileReader.loadData

Defined in

packages/core/schema/dist/index.d.ts:188


loadDataAsContent()

loadDataAsContent(fileContent, filename?): Promise<Document<Metadata>[]>

Loads data from a file and returns an array of Document objects. To be used with resultType = "text" and "markdown"

Parameters

fileContent: Uint8Array<ArrayBufferLike>

The content of the file to be loaded.

filename?: string

The name of the file to be loaded.

Returns

Promise<Document<Metadata>[]>

A Promise object that resolves to an array of Document objects.

Overrides

FileReader.loadDataAsContent

Defined in

packages/cloud/reader/dist/index.d.ts:90


loadJson()

loadJson(filePathOrContent): Promise<Record<string, any>[]>

Loads data from a file and returns an array of JSON objects. To be used with resultType = "json"

Parameters

filePathOrContent: string | Uint8Array<ArrayBufferLike>

The file path to the file or the content of the file as a Buffer

Returns

Promise<Record<string, any>[]>

A Promise that resolves to an array of JSON objects.

Defined in

packages/cloud/reader/dist/index.d.ts:98


addMetaData()

static addMetaData(filePath): (doc, index) => void

Parameters

filePath: string

Returns

Function

Parameters

doc: BaseNode<Metadata>

index: number

Returns

void

Inherited from

FileReader.addMetaData

Defined in

packages/core/schema/dist/index.d.ts:189