Aller au contenu principal

Class: LlamaParseReader

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

Implements

Constructors

new LlamaParseReader()

new LlamaParseReader(params): LlamaParseReader

Parameters

params: Partial <LlamaParseReader>= {}

Returns

LlamaParseReader

Source

packages/core/src/readers/LlamaParseReader.ts:72

Properties

apiKey

apiKey: string

Source

packages/core/src/readers/LlamaParseReader.ts:55


baseUrl

baseUrl: string = "https://api.cloud.llamaindex.ai/api/parsing"

Source

packages/core/src/readers/LlamaParseReader.ts:57


checkInterval

checkInterval: number = 1

Source

packages/core/src/readers/LlamaParseReader.ts:61


language

language: Language = "en"

Source

packages/core/src/readers/LlamaParseReader.ts:67


maxTimeout

maxTimeout: number = 2000

Source

packages/core/src/readers/LlamaParseReader.ts:59


parsingInstruction

parsingInstruction: string = ""

Source

packages/core/src/readers/LlamaParseReader.ts:69


resultType

resultType: ResultType = "text"

Source

packages/core/src/readers/LlamaParseReader.ts:65


verbose

verbose: boolean = true

Source

packages/core/src/readers/LlamaParseReader.ts:63

Methods

getMimeType()

private getMimeType(data): Promise<string>

Parameters

data: Buffer

Returns

Promise<string>

Source

packages/core/src/readers/LlamaParseReader.ts:158


loadData()

loadData(file, fs): Promise <Document <Metadata>[]>

Parameters

file: string

fs: GenericFileSystem= defaultFS

Returns

Promise <Document <Metadata>[]>

Implementation of

FileReader . loadData

Source

packages/core/src/readers/LlamaParseReader.ts:83