Skip to main content

Class: BufferLoader

document_loaders/fs/buffer.BufferLoader

Hierarchy

Constructors

constructor

new BufferLoader(filePathOrBlob)

Parameters

NameType
filePathOrBlobstring | Blob

Overrides

BaseDocumentLoader.constructor

Defined in

langchain/src/document_loaders/fs/buffer.ts:7

Properties

filePathOrBlob

filePathOrBlob: string | Blob

Defined in

langchain/src/document_loaders/fs/buffer.ts:7

Methods

load

load(): Promise<Document<Record<string, any>>[]>

Returns

Promise<Document<Record<string, any>>[]>

Overrides

BaseDocumentLoader.load

Defined in

langchain/src/document_loaders/fs/buffer.ts:16


loadAndSplit

loadAndSplit(splitter?): Promise<Document<Record<string, any>>[]>

Parameters

NameType
splitterTextSplitter

Returns

Promise<Document<Record<string, any>>[]>

Inherited from

BaseDocumentLoader.loadAndSplit

Defined in

langchain/src/document_loaders/base.ts:15


parse

Protected Abstract parse(raw, metadata): Promise<Document<Record<string, any>>[]>

Parameters

NameType
rawBuffer
metadataRecord<string, any>

Returns

Promise<Document<Record<string, any>>[]>

Defined in

langchain/src/document_loaders/fs/buffer.ts:11


imports

Static imports(): Promise<{ readFile: (path: PathLike | FileHandle, options?: null | {} & Abortable) => Promise<Buffer>(path: PathLike | FileHandle, options: {} & Abortable | BufferEncoding) => Promise<string>(path: PathLike | FileHandle, options?: null | BufferEncoding | ObjectEncodingOptions & Abortable & {}) => Promise<string | Buffer> }>

Returns

Promise<{ readFile: (path: PathLike | FileHandle, options?: null | {} & Abortable) => Promise<Buffer>(path: PathLike | FileHandle, options: {} & Abortable | BufferEncoding) => Promise<string>(path: PathLike | FileHandle, options?: null | BufferEncoding | ObjectEncodingOptions & Abortable & {}) => Promise<string | Buffer> }>

Defined in

langchain/src/document_loaders/fs/buffer.ts:32