본문으로 건너뛰기

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:135

Properties

apiKey

apiKey: string

Source

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


baseUrl

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

Source

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


checkInterval

checkInterval: number = 1

Source

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


gpt4oApiKey?

optional gpt4oApiKey: string

Source

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


gpt4oMode

gpt4oMode: boolean = false

Source

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


invalidateCache

invalidateCache: boolean = false

Source

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


language

language: Language = "en"

Source

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


maxTimeout

maxTimeout: number = 2000

Source

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


parsingInstruction

parsingInstruction: string = ""

Source

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


resultType

resultType: ResultType = "text"

Source

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


skipDiagonalText

skipDiagonalText: boolean = false

Source

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


verbose

verbose: boolean = true

Source

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

Methods

getMimeType()

private getMimeType(data): Promise<string>

Parameters

data: Buffer

Returns

Promise<string>

Source

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


loadData()

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

Parameters

file: string

Returns

Promise <Document <Metadata>[]>

Implementation of

FileReader . loadData

Source

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