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

constructor

new LlamaParseReader(params?): LlamaParseReader

Parameters

NameType
paramsPartial<LlamaParseReader>

Returns

LlamaParseReader

Defined in

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

Properties

apiKey

apiKey: string

Defined in

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


baseUrl

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

Defined in

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


checkInterval

checkInterval: number = 1

Defined in

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


maxTimeout

maxTimeout: number = 2000

Defined in

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


resultType

resultType: ResultType = "text"

Defined in

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


verbose

verbose: boolean = true

Defined in

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

Methods

getMimeType

getMimeType(data): Promise<string>

Parameters

NameType
dataBuffer

Returns

Promise<string>

Defined in

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


loadData

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

Parameters

NameTypeDefault value
filestring | URLundefined
fsGenericFileSystemdefaultFS

Returns

Promise<Document<Metadata>[]>

Implementation of

FileReader.loadData

Defined in

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