langchain.js
    Preparing search index...

    A document loader that loads unstructured documents from a directory using the UnstructuredLoader. It creates a UnstructuredLoader instance for each supported file type and passes it to the DirectoryLoader constructor.

    const loader = new UnstructuredDirectoryLoader("path/to/directory", {
    apiKey: "MY_API_KEY",
    });
    const docs = await loader.load();

    Hierarchy

    • DirectoryLoader
      • UnstructuredDirectoryLoader
    Index

    Constructors

    Constructors

    • Parameters

      • directoryPathOrLegacyApiUrl: string
      • optionsOrLegacyDirectoryPath: string | UnstructuredDirectoryLoaderOptions
      • legacyOptionRecursive: boolean = true
      • legacyOptionUnknown: UnknownHandling = UnknownHandling.Warn

      Returns UnstructuredDirectoryLoader