• Import from "@langchain/community/document_loaders/fs/unstructured" instead. This entrypoint will be removed in 0.3.0.

A document loader that uses the Unstructured API to load unstructured documents. It supports both the new syntax with options object and the legacy syntax for backward compatibility. The load() method sends a partitioning request to the Unstructured API and retrieves the partitioned elements. It creates a Document instance for each element and returns an array of Document instances.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

filePath: string

Methods

  • Returns Promise<{
        basename: ((path: string, suffix?: string) => string);
        readFile: {
            (path: PathLike | FileHandle, options?: null | {
                encoding?: null;
                flag?: OpenMode;
            } & Abortable): Promise<Buffer>;
            (path: PathLike | FileHandle, options: BufferEncoding | {
                encoding: BufferEncoding;
                flag?: OpenMode | undefined;
            } & Abortable): Promise<string>;
            (path: PathLike | FileHandle, options?: null | BufferEncoding | ObjectEncodingOptions & Abortable & {
                flag?: OpenMode | undefined;
            }): Promise<string | Buffer>;
        };
    }>