it locally.from langchain.document_loaders import UnstructuredAPIFileLoaderfilenames = ["example_data/fake.docx", "example_data/fake-email.eml"]loader = UnstructuredAPIFileLoader(    file_path=filenames[0],    api_key="FAKE_API_KEY",)docs = loader.load()docs[0]    Document(page_content='Lorem ipsum dolor sit amet.', metadata={'source': 'example_data/fake.docx'})You can also batch multiple files through the Unstructured API in a single API using UnstructuredAPIFileLoader.loader = UnstructuredAPIFileLoader(    file_path=filenames,    api_key="FAKE_API_KEY",)docs = loader.load()docs[0]    Document(page_content='Lorem ipsum dolor sit amet.\n\nThis is a test email to use for unit tests.\n\nImportant points:\n\nRoses are red\n\nViolets are blue', metadata={'source': ['example_data/fake.docx', 'example_data/fake-email.eml']})PreviousTwitterNextURLRetain ElementsDefine a Partitioning StrategyPDF ExampleUnstructured APICommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This notebook covers how to use Unstructured package to load files of many types. Unstructured currently supports loading of text files, powerpoints, html, pdfs, images, and more.
This notebook covers how to use Unstructured package to load files of many types. Unstructured currently supports loading of text files, powerpoints, html, pdfs, images, and more. ->: it locally.from langchain.document_loaders import UnstructuredAPIFileLoaderfilenames = ["example_data/fake.docx", "example_data/fake-email.eml"]loader = UnstructuredAPIFileLoader(    file_path=filenames[0],    api_key="FAKE_API_KEY",)docs = loader.load()docs[0]    Document(page_content='Lorem ipsum dolor sit amet.', metadata={'source': 'example_data/fake.docx'})You can also batch multiple files through the Unstructured API in a single API using UnstructuredAPIFileLoader.loader = UnstructuredAPIFileLoader(    file_path=filenames,    api_key="FAKE_API_KEY",)docs = loader.load()docs[0]    Document(page_content='Lorem ipsum dolor sit amet.\n\nThis is a test email to use for unit tests.\n\nImportant points:\n\nRoses are red\n\nViolets are blue', metadata={'source': ['example_data/fake.docx', 'example_data/fake-email.eml']})PreviousTwitterNextURLRetain ElementsDefine a Partitioning StrategyPDF ExampleUnstructured APICommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.