Ga naar hoofdinhoud

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

Properties

apiKey

apiKey: string

Defined in

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


baseUrl

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

Defined in

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


checkInterval

checkInterval: number = 1

Defined in

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


maxTimeout

maxTimeout: number = 2000

Defined in

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


resultType

resultType: ResultType = "text"

Defined in

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


verbose

verbose: boolean = true

Defined in

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

Methods

getMimeType

getMimeType(data): Promise<string>

Parameters

NameType
dataBuffer

Returns

Promise<string>

Defined in

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


loadData

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

Parameters

NameTypeDefault value
filestringundefined
fsGenericFileSystemdefaultFS

Returns

Promise<Document<Metadata>[]>

Implementation of

FileReader.loadData

Defined in

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