Interface that defines the methods for loading and splitting documents.

interface WebBaseLoader {
    caller: AsyncCaller;
    headers?: HeadersInit;
    textDecoder?: TextDecoder;
    timeout: number;
    load(): Promise<Document<Record<string, any>>[]>;
    loadAndSplit(textSplitter?: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>): Promise<Document<Record<string, any>>[]>;
}

Hierarchy (view full)

Implemented by

Properties

caller: AsyncCaller
headers?: HeadersInit
textDecoder?: TextDecoder
timeout: number

Methods

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

  • Parameters

    • OptionaltextSplitter: BaseDocumentTransformer<DocumentInterface<Record<string, any>>[], DocumentInterface<Record<string, any>>[]>

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